+
diff --git a/react/src/components/dashboard/sendCoin/sendCoin.js b/react/src/components/dashboard/sendCoin/sendCoin.js
index 4d3ce8b..c4504fe 100644
--- a/react/src/components/dashboard/sendCoin/sendCoin.js
+++ b/react/src/components/dashboard/sendCoin/sendCoin.js
@@ -67,9 +67,29 @@ class SendCoin extends React.Component {
}
setRecieverFromScan(receiver) {
- this.setState({
- sendTo: receiver
- });
+ try {
+ const recObj = JSON.parse(receiver);
+
+ if (recObj &&
+ typeof recObj === 'object') {
+ if (recObj.coin === this.props.ActiveCoin.coin) {
+ if (recObj.amount) {
+ this.setState({
+ amount: recObj.amount,
+ });
+ }
+ if (recObj.address) {
+ this.setState({
+ sendTo: recObj.address,
+ });
+ }
+ }
+ }
+ } catch (e) {
+ this.setState({
+ sendTo: receiver,
+ });
+ }
document.getElementById('edexcoinSendTo').focus();
}
diff --git a/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js b/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js
index 7efbcf0..e5acb5b 100644
--- a/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js
+++ b/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js
@@ -81,10 +81,29 @@ class WalletsNativeSend extends React.Component {
}
setRecieverFromScan(receiver) {
- this.setState({
- sendTo: receiver,
- });
-
+ try {
+ const recObj = JSON.parse(receiver);
+
+ if (recObj &&
+ typeof recObj === 'object') {
+ if (recObj.coin === this.props.ActiveCoin.coin) {
+ if (recObj.amount) {
+ this.setState({
+ amount: recObj.amount,
+ });
+ }
+ if (recObj.address) {
+ this.setState({
+ sendTo: recObj.address,
+ });
+ }
+ }
+ }
+ } catch (e) {
+ this.setState({
+ sendTo: receiver,
+ });
+ }
document.getElementById('kmdWalletSendTo').focus();
}
@@ -99,9 +118,11 @@ class WalletsNativeSend extends React.Component {
}
checkZAddressCount() {
- if (this.props.ActiveCoin.addresses &&
- (!this.props.ActiveCoin.addresses.private ||
- this.props.ActiveCoin.addresses.private.length === 0)) {
+ const _addresses = this.props.ActiveCoin.addresses;
+
+ if (_addresses &&
+ (!_addresses.private ||
+ _addresses.private.length === 0)) {
this.setState({
renderAddressDropdown: false,
});
diff --git a/react/src/translate/en.js b/react/src/translate/en.js
index 2ca27fe..c95fd3f 100644
--- a/react/src/translate/en.js
+++ b/react/src/translate/en.js
@@ -307,6 +307,10 @@ export const _lang = {
'TOGGLE_ZERO_ADDRESSES': 'Toggle empty addresses',
'NEXT_PAGE': 'Next Page',
'PREVIOUS_PAGE': 'Previous Page',
+ 'CREATE_INVOICE': 'Create Invoice',
+ 'CREATE_INVOICE_QR': 'Create Invoice QR Code',
+ 'QR_CONTENT': 'QR Content',
+ 'CHOOSE_RECEIVING_ADDRESS': 'Choose Address',
},
'ATOMIC': {
'RAW_OUTPUT': 'Raw Output',