Browse Source

Fix a bug where calculated balance could not refresh on UI

to repro, switch between 2 accounts having same balance (this is very rare to have btw)
master
Gaëtan Renaudeau 7 years ago
parent
commit
1a9ddb63cc
  1. 4
      src/components/CalculateBalance.js

4
src/components/CalculateBalance.js

@ -79,7 +79,9 @@ const mapStateToProps = (state: State, props: OwnProps) => {
balanceHistory,
balanceStart: balanceHistory[0].value,
balanceEnd,
hash: `${balanceHistory.length}_${balanceEnd}_${isAvailable.toString()}`,
hash: `${props.accounts.length > 0 ? props.accounts[0].id : ''}_${
balanceHistory.length
}_${balanceEnd}_${isAvailable.toString()}`,
}
}

Loading…
Cancel
Save