From 70294d6fa13a4044a72497074b405b7d4f46b0b1 Mon Sep 17 00:00:00 2001 From: Marty Alcala Date: Thu, 20 Oct 2016 16:37:47 -0400 Subject: [PATCH] don't show incoming data menu when data is pasted into the send view --- src/js/services/incomingData.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index f007935f8..7b8a0117c 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -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;