Browse Source

AGP-215, Added notice to user if QR-code has different coin than active wallet coin

v0.25
Miika Turunen 7 years ago
parent
commit
78f29b795e
  1. 12
      react/src/components/dashboard/sendCoin/sendCoin.js
  2. 12
      react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js
  3. 4
      react/src/translate/en.js

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

@ -83,6 +83,18 @@ class SendCoin extends React.Component {
sendTo: recObj.address,
});
}
} else {
Store.dispatch(
triggerToaster(
translate('SEND.QR_COIN_MISMATCH_MESSAGE_IMPORT_COIN') +
recObj.coin +
translate('SEND.QR_COIN_MISMATCH_MESSAGE_ACTIVE_COIN') +
this.props.ActiveCoin.coin +
translate('SEND.QR_COIN_MISMATCH_MESSAGE_END'),
translate('SEND.QR_COIN_MISMATCH_TITLE'),
'warning'
)
);
}
}
} catch (e) {

12
react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js

@ -97,6 +97,18 @@ class WalletsNativeSend extends React.Component {
sendTo: recObj.address,
});
}
} else {
Store.dispatch(
triggerToaster(
translate('SEND.QR_COIN_MISMATCH_MESSAGE_IMPORT_COIN') +
recObj.coin +
translate('SEND.QR_COIN_MISMATCH_MESSAGE_ACTIVE_COIN') +
this.props.ActiveCoin.coin +
translate('SEND.QR_COIN_MISMATCH_MESSAGE_END'),
translate('SEND.QR_COIN_MISMATCH_TITLE'),
'warning'
)
);
}
}
} catch (e) {

4
react/src/translate/en.js

@ -659,6 +659,10 @@ export const _lang = {
'TOTAL_AMOUNT_POSITIVE_NUMBER': 'Total amount (amount - fee) must be a positive number',
'INSUFFICIENT_FUNDS': 'You don\'t have the necessary funds to make this transaction',
'SELECT_SOURCE_ADDRESS': 'Select source (from) address',
'QR_COIN_MISMATCH_MESSAGE_IMPORT_COIN': 'QR code had coin ',
'QR_COIN_MISMATCH_MESSAGE_ACTIVE_COIN': '. You have ',
'QR_COIN_MISMATCH_MESSAGE_END': ' active in your wallet. Please, check that you have same coin active that you try to import!',
'QR_COIN_MISMATCH_TITLE': 'Coin Mismatch',
},
'FIAT_CURRENCIES': {
'AUD': 'Australian Dollar (AUD)',

Loading…
Cancel
Save