Browse Source

enable claim interest ui for balances > 10 kmd

v0.25
pbca26 7 years ago
parent
commit
94757ea99a
  1. 9
      react/src/components/dashboard/walletsData/walletsData.js
  2. 31
      react/src/components/dashboard/walletsData/walletsData.render.js
  3. 4
      react/src/translate/en.js

9
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;
}
}
}

31
react/src/components/dashboard/walletsData/walletsData.render.js

@ -208,19 +208,34 @@ export const WalletsDataRender = function() {
return (
<span>
<div id="edexcoin_dashboardinfo">
{ this.displayClaimInterestUI() &&
{ (this.displayClaimInterestUI() === 777 || this.displayClaimInterestUI() === -777) &&
<div className="col-xs-12 margin-top-20 backround-gray">
<div className="panel no-margin">
<div>
<div className="col-xlg-12 col-lg-12 col-sm-12 col-xs-12">
<div className="panel no-margin padding-top-10 padding-bottom-10 center">
{ translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P1') } <strong>{ this.props.ActiveCoin.balance.interest }</strong> KMD { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P2') }.
<button
type="button"
className="btn btn-success waves-effect waves-light dashboard-claim-interest-btn"
onClick={ this.openClaimInterestModal }>
<i className="icon fa-dollar"></i> { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P3') }
</button>
{ this.displayClaimInterestUI() === 777 &&
<div>
{ translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P1') } <strong>{ this.props.ActiveCoin.balance.interest }</strong> KMD { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P2') }.
<button
type="button"
className="btn btn-success waves-effect waves-light dashboard-claim-interest-btn"
onClick={ this.openClaimInterestModal }>
<i className="icon fa-dollar"></i> { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_P3') }
</button>
</div>
}
{ this.displayClaimInterestUI() === -777 &&
<div>
{ translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_ALT_P1') }.
<button
type="button"
className="btn btn-success waves-effect waves-light dashboard-claim-interest-btn"
onClick={ this.openClaimInterestModal }>
<i className="icon fa-search"></i> { translate('DASHBOARD.CLAIM_INTEREST_HELPER_BAR_ALT_P2') }
</button>
</div>
}
</div>
</div>
</div>

4
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!',

Loading…
Cancel
Save