Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: forward when amount is zero #4

Merged
merged 2 commits into from
Nov 29, 2017
Merged

Conversation

sentientwaffle
Copy link
Collaborator

No description provided.

if (nextHop.local) {
const finalAmount = new BigNumber(data.amount)
// Always forward when finalAmount is 0.
if (nextHop.local && !finalAmount.equals(0)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to just do data.amount !== '0'. Any advantage to using BigNumber here?

@sentientwaffle sentientwaffle merged commit d028398 into master Nov 29, 2017
@sentientwaffle sentientwaffle deleted the dj-forward-zero-amount branch November 29, 2017 15:50
@justmoon
Copy link
Collaborator

I was going to say: Perhaps wait for interledgerjs/ilp-connector#397 before merging to give folks a chance to discuss.

But I was too slow. ^^

No harm, we can always revert if necessary. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants