-
Notifications
You must be signed in to change notification settings - Fork 92
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
app: balances widget #454
app: balances widget #454
Conversation
With the changes introduced in decred#390 and decred#418, the balance display can now display more detailed information. Adds a balance widget to display the categorized DEX-specific balance and the wallet state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code reads well. Great changes to the UI here. Just a couple comments.
I suppose this would be a good exercise for writing a db upgrade function and all that. TBH I'm not 100% clear on that process, but @dnldd can help with that first 0 -> 1 upgrade. Are we comfortable beginning db versions now? It has to happen darn soon, but if it's easier to get this in first and then start upgrading, we can do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, thanks. Would love a test drive from someone else though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great when I make the accounts!
But if I restart dexc, the ui gets a little wierd, the btc symbol doesn't show up, and there is a spiral progress bar:
The console error reads:
TypeError: o.balances.xc is null markets.js:1317:16
updateWallet markets.js:1317
setWallets markets.js:1288
handleBookRoute markets.js:544
MarketsPage markets.js:152
forward ws.js:37
onmessage ws.js:97
And, could you make the disconnected tooltip have the white background too?
@@ -627,11 +627,13 @@ func (c *Core) walletBalances(wallet *xcWallet) (*BalanceSet, error) { | |||
for i, bal := range bals[1:] { | |||
balMap[addrs[i]] = bal | |||
} | |||
coreBals := &BalanceSet{ | |||
coreBals := &db.BalanceSet{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core is now anatomically correct
I didn't see any issues in normal use, so I'm assuming the only errors happen when dexc is shutdown. Presumably refreshing the browser once dexc is running again restores normal function? We can address in a follow-up if there's a bigger issue. |
made an issue #473 |
With the changes introduced in #390 and #418, we can now display more detailed balance information.
data-tooltip
attribute to any element.Application
does the rest.BalanceSet
from client/core to client/db, and store the entire thing. Haven't changed the version yet, so you'll need to delete or cache your dexc.db for testing for now, but if multi: add client db upgrade infrastructure. #448 goes in first, I can update here accordingly. Moved theBalUpdate
field fromdb.Wallet
todb.BalanceSet
.And this one is specifically for the situation outlined in 6.