diff --git a/react/src/components/dashboard/walletsData/walletsData.js b/react/src/components/dashboard/walletsData/walletsData.js index 828cdf0..abe9c8f 100644 --- a/react/src/components/dashboard/walletsData/walletsData.js +++ b/react/src/components/dashboard/walletsData/walletsData.js @@ -88,10 +88,13 @@ class WalletsData extends React.Component { if (this.props.ActiveCoin && this.props.ActiveCoin.coin === 'KMD' && this.props.ActiveCoin.mode === 'native' && - this.props.ActiveCoin.balance && - this.props.ActiveCoin.balance.interest && + this.props.ActiveCoin.balance) { + if (this.props.ActiveCoin.balance.interest && this.props.ActiveCoin.balance.interest > 0) { - return true; + return 777; + } else if (this.props.ActiveCoin.balance.transparent && this.props.ActiveCoin.balance.transparent > 10) { + return -777; + } } } diff --git a/react/src/components/dashboard/walletsData/walletsData.render.js b/react/src/components/dashboard/walletsData/walletsData.render.js index 3496bfb..3442509 100644 --- a/react/src/components/dashboard/walletsData/walletsData.render.js +++ b/react/src/components/dashboard/walletsData/walletsData.render.js @@ -208,19 +208,34 @@ export const WalletsDataRender = function() { return (
- { this.displayClaimInterestUI() && + { (this.displayClaimInterestUI() === 777 || this.displayClaimInterestUI() === -777) &&
- { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P1') } { this.props.ActiveCoin.balance.interest } KMD { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P2') }. - + { this.displayClaimInterestUI() === 777 && +
+ { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P1') } { this.props.ActiveCoin.balance.interest } KMD { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P2') }. + +
+ } + { this.displayClaimInterestUI() === -777 && +
+ { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_ALT_P1') }. + +
+ }
diff --git a/react/src/translate/en.js b/react/src/translate/en.js index 3c7210b..e7e99fc 100644 --- a/react/src/translate/en.js +++ b/react/src/translate/en.js @@ -455,8 +455,10 @@ export const _lang = { 'FAILED_TX_INFO': 'Transaction failed or block reindexing is in progress. Failed transactions usually rejected after a while resulting in your funds being credited back.', 'SPV_CLAIMED_INTEREST': 'Claimed interest', 'CLAIM_INTEREST_HELPER_BAR_P1': 'You have', - 'CLAIM_INTEREST_HELPER_BAR_P2': 'to claim.', + 'CLAIM_INTEREST_HELPER_BAR_P2': 'to claim', 'CLAIM_INTEREST_HELPER_BAR_P3': 'Claim now', + 'CLAIM_INTEREST_HELPER_BAR_ALT_P1': 'You don\'t have any interest to claim', + 'CLAIM_INTEREST_HELPER_BAR_ALT_P2': 'Check UTXO', 'SEARCH': 'Search', 'WIN_SYNC_WORKAROUND_APPLIED': 'Windows sync workaround is applied. Closing the app...', 'WIN_SYNC_WORKAROUND_APPLY_FAILED': 'Unable to apply Windows sync workaround!',