Merge pull request #1410 from esteemapp/wallet/button

Wallet/button
This commit is contained in:
Feruz M 2019-12-17 04:16:14 +02:00 committed by GitHub
commit e3e8de8619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,23 +110,20 @@ const WalletContainer = ({
).toFixed(3),
);
setUnclaimedBalance(
`${
get(walletData, 'rewardSteemBalance', 0)
? `${Math.round(get(walletData, 'rewardSteemBalance', 0) * 1000) / 1000} STEEM`
: ''
}
${
get(walletData, 'rewardSbdBalance', 0)
? ` ${Math.round(get(walletData, 'rewardSbdBalance', 0) * 1000) / 1000} SBD`
: ''
}
${
if (
get(walletData, 'rewardSteemBalance', 0) ||
get(walletData, 'rewardSbdBalance', 0) ||
get(walletData, 'rewardVestingSteem', 0)
? ` ${Math.round(get(walletData, 'rewardVestingSteem', 0) * 1000) / 1000} SP`
: ''
}`,
) {
const getBalance = (val, cur) => (val ? Math.round(val * 1000) / 1000 + cur : '');
setUnclaimedBalance(
`${getBalance(get(walletData, 'rewardSteemBalance', 0), ' STEEM')} ${getBalance(
get(walletData, 'rewardSbdBalance', 0),
' SBD',
)} ${getBalance(get(walletData, 'rewardVestingSteem', 0), ' SP')}`,
);
}
}, [userActivities, walletData]);
// Components functions