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

fix(account_page_header_dropdown_balances), fixes #940 #941

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/containers/Accounts/AccountHeader/test/actions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ describe('AccountHeader Actions', () => {
CHF: 0.7519685210971255,
CNY: 12.328638002,
DYM: 95.13258522535791,
EUR: 53.426387263174405,
GBP: 79.51188949705619,
EUR: 28.42638726317441,
GBP: 78.5098894970562,
JPY: 4986.30908732758,
USD: 936.8290046958887,
USD: 275.7836054268899,
XAU: 3.419442510305086,
XRP: 1172875.760329,
},
Expand Down
10 changes: 1 addition & 9 deletions src/rippled/accountState.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,9 @@ const log = logger({ name: 'account balances' })

const formatBalances = (info, data) => {
const balances = { XRP: Number(info.Balance) / 1000000 }
const { assets = {}, obligations = {} } = data
const { assets = {} } = data
const tokens = []

Object.keys(obligations).forEach((currency) => {
if (!balances[currency]) {
balances[currency] = 0
}

balances[currency] += Number(obligations[currency])
})

Object.keys(assets).forEach((issuer) => {
assets[issuer].forEach((d) => {
if (!balances[d.currency]) {
Expand Down
Loading