Browse Source

spv broadcast error info

v0.25
pbca26 7 years ago
parent
commit
268cb96199
  1. 6
      react/src/components/dashboard/sendCoin/sendCoin.js
  2. 10
      react/src/components/dashboard/sendCoin/sendCoin.render.js

6
react/src/components/dashboard/sendCoin/sendCoin.js

@ -17,7 +17,7 @@ import {
AddressListRender,
SendRender,
SendFormRender,
_SendFormRender
_SendFormRender,
} from './sendCoin.render';
import { isPositiveNumber } from '../../../util/number';
import mainWindow from '../../../util/mainWindow';
@ -502,7 +502,7 @@ class SendCoin extends React.Component {
if (Number(_amountSats) + _fees[this.props.ActiveCoin.coin] > _balanceSats) {
Store.dispatch(
triggerToaster(
`${translate('SEND.INSUFFICIENT_FUNDS')} ${translate('SEND.MAX_AVAIL_BALANCE')} ${(0.00000001 * (_balanceSats - _fees[this.props.ActiveCoin.coin])).toFixed(8)} ${this.props.ActiveCoin.coin}`,
`${translate('SEND.INSUFFICIENT_FUNDS')} ${translate('SEND.MAX_AVAIL_BALANCE')} ${Number((0.00000001 * (_balanceSats - _fees[this.props.ActiveCoin.coin])).toFixed(8))} ${this.props.ActiveCoin.coin}`,
translate('TOASTR.WALLET_NOTIFICATION'),
'error'
)
@ -511,7 +511,7 @@ class SendCoin extends React.Component {
} else if (Number(_amountSats) < _fees[this.props.ActiveCoin.coin]) {
Store.dispatch(
triggerToaster(
`${translate('SEND.AMOUNT_IS_TOO_SMALL', this.state.amount)}, ${translate('SEND.MIN_AMOUNT_IS', this.props.ActiveCoin.coin)} ${_fees[this.props.ActiveCoin.coin] * 0.00000001}`,
`${translate('SEND.AMOUNT_IS_TOO_SMALL', this.state.amount)}, ${translate('SEND.MIN_AMOUNT_IS', this.props.ActiveCoin.coin)} ${Number(_fees[this.props.ActiveCoin.coin] * 0.00000001)}`,
translate('TOASTR.WALLET_NOTIFICATION'),
'error'
)

10
react/src/components/dashboard/sendCoin/sendCoin.render.js

@ -353,6 +353,16 @@ export const SendRender = function() {
this.state.lastSendToResponse.raw.txid &&
<div>{ this.state.lastSendToResponse.raw.txid.replace(/\[.*\]/, '') }</div>
}
{ this.state.lastSendToResponse.raw.txid.indexOf('bad-txns-inputs-spent') > -1 &&
<div className="margin-top-10">
{ translate('SEND.BAD_TXN_SPENT_ERR1') }
<ul>
<li>{ translate('SEND.BAD_TXN_SPENT_ERR2') }</li>
<li>{ translate('SEND.BAD_TXN_SPENT_ERR3') }</li>
<li>{ translate('SEND.BAD_TXN_SPENT_ERR4') }</li>
</ul>
</div>
}
</div>
}
</div>

Loading…
Cancel
Save