Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

fix(grpc): use Numbers to represent long values #728

Merged
merged 1 commit into from Aug 30, 2018

Conversation

mrfelton
Copy link
Member

@mrfelton mrfelton commented Aug 29, 2018

Configure gRPC to use Numbers to represent long values instead of Strings. This ensures that we can do accurate handling of numerical values.

Description:

This ensures that numbers are actually numbers and not strings so a check like if (val) { ... } would will give expected results.

For example:

if (0) { echo "something" }
   => undefined

but

if ("0") { echo "something" }
    => "something"

("0" is a truthy value, whilst 0 is not)

Motivation and Context:

Fix #727

Types of changes:

Bux fix

Checklist:

  • My code follows the code style of this project.
  • I have reviewed and updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes where needed.
  • All new and existing tests passed.
  • My commits have been squashed into a concise set of changes.

@mrfelton mrfelton added the type: bug 🐛 Something isn't working label Aug 29, 2018
@mrfelton mrfelton added this to the v0.2.2-beta milestone Aug 29, 2018
@mrfelton mrfelton self-assigned this Aug 29, 2018
@coveralls
Copy link

coveralls commented Aug 29, 2018

Coverage Status

Coverage remained the same at 15.758% when pulling 47b95a0 on mrfelton:fix/long-as-number into 2931eff on LN-Zap:master.

Configure gRPC to use Numbers to represent long values instead of
Strings. This ensures that we can do accurate handling of numerical
values.

Fix LN-Zap#727
@JimmyMow
Copy link
Member

utACK 47b95a0

@JimmyMow JimmyMow merged commit 1ba91f1 into LN-Zap:master Aug 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invoice amount always shows as 0 on invoice detail page
3 participants