question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API returns wrong amountPaid empty string instead of 0

See original GitHub issue

On 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:closed
  • Created 5 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
ndeetcommented, May 20, 2018

@NicolasDorier Thank you! Updated my docker node to 1.0.2.22, works like a charm now. 💯

1reaction
NicolasDoriercommented, May 20, 2018

1.0.2.22 should be available in like 20-30 min.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found