From 4ffd70701bd5cef6a899815f8723fc19d0cfe096 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Sun, 3 Dec 2017 19:51:22 +0300 Subject: [PATCH] native send validation subtract fee fix, disable subtract for z addr --- .../components/dashboard/sendCoin/sendCoin.js | 2 +- .../dashboard/sendCoin/sendCoin.render.js | 30 ++++++++++--------- .../settings/settings.debugLogPanel.js | 12 +++++++- .../dashboard/settings/settings.render.js | 2 +- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/react/src/components/dashboard/sendCoin/sendCoin.js b/react/src/components/dashboard/sendCoin/sendCoin.js index 8dc8db2..0306473 100644 --- a/react/src/components/dashboard/sendCoin/sendCoin.js +++ b/react/src/components/dashboard/sendCoin/sendCoin.js @@ -529,7 +529,7 @@ class SendCoin extends React.Component { this.state.sendTo.length === 34 && this.props.ActiveCoin.balance && this.props.ActiveCoin.balance.transparent && - Number(Number(this.state.amount) + 0.0001) > Number(this.props.ActiveCoin.balance.transparent)) || + Number(Number(this.state.amount) + (this.state.subtractFee ? 0 : 0.0001)) > Number(this.props.ActiveCoin.balance.transparent)) || (this.state.addressType === 'public' && this.state.sendTo && this.state.sendTo.length > 34 && diff --git a/react/src/components/dashboard/sendCoin/sendCoin.render.js b/react/src/components/dashboard/sendCoin/sendCoin.render.js index b68ae8b..e818afc 100644 --- a/react/src/components/dashboard/sendCoin/sendCoin.render.js +++ b/react/src/components/dashboard/sendCoin/sendCoin.render.js @@ -78,21 +78,23 @@ export const _SendFormRender = function() { autoComplete="off" />
- - -
this.toggleSubtractFee() }> - { translate('DASHBOARD.SUBTRACT_FEE') } -
-
+ className="toggle-label" + onClick={ () => this.toggleSubtractFee() }> + { translate('DASHBOARD.SUBTRACT_FEE') } +
+ + }
diff --git a/react/src/components/dashboard/settings/settings.render.js b/react/src/components/dashboard/settings/settings.render.js index 3f6176f..020bc21 100644 --- a/react/src/components/dashboard/settings/settings.render.js +++ b/react/src/components/dashboard/settings/settings.render.js @@ -81,7 +81,7 @@ export const SettingsRender = function() { this.props.Main.coins.native && Object.keys(this.props.Main.coins.native).length > 0 &&