prelim logic to conditionally display incoming data menu based on the source
This commit is contained in:
parent
890dadade0
commit
78c9ac2484
2 changed files with 32 additions and 21 deletions
|
|
@ -61,7 +61,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
|
|
||||||
$scope.openScanner = function() {
|
$scope.openScanner = function() {
|
||||||
$state.go('tabs.scan');
|
$state.go('tabs.scan');
|
||||||
}
|
};
|
||||||
|
|
||||||
$scope.showMore = function() {
|
$scope.showMore = function() {
|
||||||
currentContactsPage++;
|
currentContactsPage++;
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
||||||
}
|
}
|
||||||
|
|
||||||
data = sanitizeUri(data);
|
data = sanitizeUri(data);
|
||||||
|
//data = 'msEVvmpiFEtXv3MdsFLUYMbnNLeNYrqBEA';
|
||||||
|
|
||||||
// BIP21
|
// BIP21
|
||||||
if (bitcore.URI.isValid(data)) {
|
if (bitcore.URI.isValid(data)) {
|
||||||
|
|
@ -92,9 +93,11 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
||||||
});
|
});
|
||||||
// Plain Address
|
// Plain Address
|
||||||
} else if (bitcore.Address.isValid(data, 'livenet')) {
|
} else if (bitcore.Address.isValid(data, 'livenet')) {
|
||||||
root.showMenu({data: data, type: 'bitcoinAddress'});
|
//root.showMenu({data: data, type: 'bitcoinAddress'});
|
||||||
|
goToAmountPage(data);
|
||||||
} else if (bitcore.Address.isValid(data, 'testnet')) {
|
} else if (bitcore.Address.isValid(data, 'testnet')) {
|
||||||
root.showMenu({data: data, type: 'bitcoinAddress'});
|
//root.showMenu({data: data, type: 'bitcoinAddress'});
|
||||||
|
goToAmountPage(data);
|
||||||
// Protocol
|
// 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});
|
||||||
|
|
@ -173,5 +176,13 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function goToAmountPage(toAddress) {
|
||||||
|
console.log('goToAmountPage called', toAddress);
|
||||||
|
$state.go('tabs.send');
|
||||||
|
$timeout(function() {
|
||||||
|
$state.transitionTo('tabs.send.amount', {toAddress: toAddress});
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue