From 1a9ddb63cca71bdbd8a426a0735c76d9a47a69db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Wed, 11 Jul 2018 15:04:10 +0200 Subject: [PATCH] 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) --- src/components/CalculateBalance.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/CalculateBalance.js b/src/components/CalculateBalance.js index 792f8f17..b54fe189 100644 --- a/src/components/CalculateBalance.js +++ b/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()}`, } }