API returns wrong amountPaid empty string instead of 0
See original GitHub issueOn invoice creation the original BitPay API returns 0
as empty value for amountPaid
BtcPayServer returns an empty string ""
instead. Using PHP client library.
This is causing some existing database storage of the invoice fail when switching from BitPay to BtcPayServer.
Would be great if this can be confirmed and fixed* so that we do not need to change upstream library or fix the value before saving.
* I’m not familar with C# but if you can give me some hints where this needs to be fixed I will try to get dev setup and give a PR a try.
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Get empty string instead of null - javascript
You can use Nullish coalescing operator (??) that returns its right-hand side operand when its left-hand side operand is null or undefined, ...
Read more >Use empty string, null or remove empty property in API ...
TLDR; Remove null properties. The first thing to bear in mind is that applications at their edges are not object-oriented (nor functional if ......
Read more >Use empty string, null or remove empty property in API ...
I think the right way is just removing optional property from the json data instead of setting it to null or "" empty...
Read more >Empty String Considered Harmful - Sam Jarman
The use of empty strings when used to indicate a null value or lack of value, when the language you're using has a...
Read more >String.IsNullOrEmpty(String) Method (System)
An empty string has a Length of 0. The following example creates an empty string and displays its value and its length.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@NicolasDorier Thank you! Updated my docker node to 1.0.2.22, works like a charm now. 💯
1.0.2.22 should be available in like 20-30 min.