Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Fix notification about negative balance - Closes #477 #481

Merged
merged 2 commits into from
Jul 18, 2017
Merged

Fix notification about negative balance - Closes #477 #481

merged 2 commits into from
Jul 18, 2017

Conversation

alepop
Copy link
Contributor

@alepop alepop commented Jul 12, 2017

Closes #477

@slaweet slaweet changed the base branch from master to 1.0.2 July 13, 2017 06:30
@slaweet
Copy link
Contributor

slaweet commented Jul 13, 2017

@alepop can you please add some description of how/why the bug happens? I don't see what difference do your changes make, given that JavaScript is single-threaded.

@alepop
Copy link
Contributor Author

alepop commented Jul 13, 2017

@slaweet I know that the JavaScript in single-threaded and so this bug confused me. I can not find an answer to this error except as a possible balance change after the check, but how I not understand. And I could not reproduce this behavior. I think that the variable cache may help.

@slaweet
Copy link
Contributor

slaweet commented Jul 18, 2017

Even more explicit that negative balance cannot happen would be to do the const amount = ... outside the if and then do if(amount>0)

Copy link
Contributor

@slaweet slaweet left a comment

Choose a reason for hiding this comment

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

thanks @alepop

@slaweet slaweet merged commit e00040c into LiskArchive:1.0.2 Jul 18, 2017
@slaweet
Copy link
Contributor

slaweet commented Jul 18, 2017

I still don't see how this issue could have happened, but let's merge this in and see if the issue happens again.

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

Successfully merging this pull request may close these issues.

3 participants