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;
});
// Plain Address
} else if (bitcore.Address.isValid(data, 'livenet')) {
//root.showMenu({data: data, type: 'bitcoinAddress'});
goToAmountPage(data);
} else if (bitcore.Address.isValid(data, 'testnet')) {
//root.showMenu({data: data, type: 'bitcoinAddress'});
goToAmountPage(data);
// Protocol
} else if (bitcore.Address.isValid(data, 'livenet') || bitcore.Address.isValid(data, 'testnet')) {
if($state.includes('tabs.scan')) {
root.showMenu({data: data, type: 'bitcoinAddress'});
} else {
goToAmountPage(data);
}
} else if (data && data.indexOf($window.appConfig.name + '://glidera') === 0) {
return $state.go('uriglidera', {url: data});
} 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;
} else {
root.showMenu({data: data, type: 'text'});
if($state.includes('tabs.scan')) {
root.showMenu({data: data, type: 'text'});
}
}
return false;