don't show incoming data menu when data is pasted into the send view

This commit is contained in:
Marty Alcala 2016-10-20 16:37:47 -04:00
commit 70294d6fa1

View file

@ -92,13 +92,12 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
return true; return true;
}); });
// Plain Address // Plain Address
} else if (bitcore.Address.isValid(data, 'livenet')) { } else if (bitcore.Address.isValid(data, 'livenet') || bitcore.Address.isValid(data, 'testnet')) {
//root.showMenu({data: data, type: 'bitcoinAddress'}); if($state.includes('tabs.scan')) {
goToAmountPage(data); root.showMenu({data: data, type: 'bitcoinAddress'});
} else if (bitcore.Address.isValid(data, 'testnet')) { } else {
//root.showMenu({data: data, type: 'bitcoinAddress'}); goToAmountPage(data);
goToAmountPage(data); }
// Protocol
} else if (data && data.indexOf($window.appConfig.name + '://glidera') === 0) { } else if (data && data.indexOf($window.appConfig.name + '://glidera') === 0) {
return $state.go('uriglidera', {url: data}); return $state.go('uriglidera', {url: data});
} else if (data && data.indexOf($window.appConfig.name + '://coinbase') === 0) { } else if (data && data.indexOf($window.appConfig.name + '://coinbase') === 0) {
@ -132,7 +131,10 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
}); });
return true; return true;
} else { } else {
root.showMenu({data: data, type: 'text'});
if($state.includes('tabs.scan')) {
root.showMenu({data: data, type: 'text'});
}
} }
return false; return false;