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

Don't show 0 balance when not Unlocked #88

Merged
merged 1 commit into from
Oct 16, 2015

Conversation

bitspill
Copy link
Contributor

By showing hyphens rather than a 0 it should put some minds at ease rather than assuming all coins are lost.

@DavidVorick
Copy link
Member

Cool. We should probably do this in siac as well

@@ -81,6 +80,8 @@ IPC.on('wallet-update', function(err, result) {
} else {
updateField(err, 'Locked', '', 'lock');
}

updateField(err, 'Balance: ', unlocked ? bal : '---', 'balance');
Copy link
Contributor

Choose a reason for hiding this comment

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

This should go up near where bal is initialized. Further, the whole function does nothing when result === null so a

if (!result) {
    return;
}

at the top would make the code less verbose and more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The balance field is dependent upon the unlock state so it had to be moved below it, I just brought the bal initialization down next to it so they're together.

result === null adjustment has also been made.

@lukechampine
Copy link
Member

Didn't 75955d0 address this? I don't see a balance at all when the wallet is locked.

@bitspill
Copy link
Contributor Author

75955d0 only modified the Wallet plugin, this pull is for the Overview plugin.

@lukechampine
Copy link
Member

ah, gotcha

DavidVorick added a commit that referenced this pull request Oct 16, 2015
Don't show 0 balance when not Unlocked
@DavidVorick DavidVorick merged commit 9e553ac into NebulousLabs:master Oct 16, 2015
@bitspill bitspill deleted the ZeroBalance branch October 16, 2015 06:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants