fix issues

This commit is contained in:
nicocappabianca
2020-09-30 22:11:15 -03:00
parent 37182fb266
commit ca331a0bf4
2 changed files with 12 additions and 8 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ class AdminLTEPage extends React.Component {
menuIsHide: false,
walletInfo: {},
inFetch: false,
usdBalance: 0,
usdBalance: 0,
currentRate: 0
}
+11 -7
View File
@@ -81,12 +81,12 @@ class Send extends React.Component {
}
/>
<div className="text-left pb-4">
<p>
{ _this.state.sendCurrency === 'BCH'
? `USD: ${ (_this.state.amountSat * (_this.props.currentRate / 100).toFixed(2)) }`
: `BCH: ${ (_this.state.amountSat / (_this.props.currentRate / 100).toFixed(2)) }`
}
</p>
<p>
{ _this.state.sendCurrency === 'BCH'
? `USD: ${ (_this.state.amountSat * (_this.props.currentRate / 100)).toFixed(2) }`
: `BCH: ${ (_this.state.amountSat / (_this.props.currentRate / 100)).toFixed(8) }`
}
</p>
</div>
<Button
text='Send'
@@ -149,7 +149,11 @@ class Send extends React.Component {
_this.validateInputs()
const bchWalletLib = _this.props.bchWallet
const { address, amountSat } = _this.state
let { address, amountSat } = _this.state
if(_this.state.sendCurrency === 'USD') {
amountSat = (amountSat / (_this.props.currentRate / 100)).toFixed(8);
}
const receivers = [
{