cleanup
This commit is contained in:
parent
468850f9fb
commit
15830a861b
1 changed files with 10 additions and 16 deletions
|
|
@ -8,10 +8,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
$rootScope.$broadcast('incomingDataMenu.showMenu', data);
|
||||
};
|
||||
|
||||
// $timeout(function() {
|
||||
// root.redir('data');
|
||||
// }, 2000);
|
||||
|
||||
root.redir = function(data) {
|
||||
$log.debug('Processing incoming data: ' + data);
|
||||
|
||||
|
|
@ -51,8 +47,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
}
|
||||
|
||||
data = sanitizeUri(data);
|
||||
//data = 'msEVvmpiFEtXv3MdsFLUYMbnNLeNYrqBEA';
|
||||
//data = 'bitcoin:n4asaBf1Vr9Sfijv6e3YJH2SCMdSLNeW64?amount=0.001592&r=https%3A%2F%2Ftest.bitpay.com%3A443%2Fi%2FVLafdjvp5EnEDwV5UHLoFQ';
|
||||
|
||||
// BIP21
|
||||
if (bitcore.URI.isValid(data)) {
|
||||
|
|
@ -63,21 +57,21 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
|
||||
var amount = parsed.amount ? parsed.amount : '';
|
||||
|
||||
$state.go('tabs.send');
|
||||
// Timeout is required to enable the "Back" button
|
||||
$timeout(function() {
|
||||
if (parsed.r) {
|
||||
getPayProDetails(parsed.r, function(err, details) {
|
||||
handlePayPro(details);
|
||||
});
|
||||
} else {
|
||||
if (parsed.r) {
|
||||
getPayProDetails(parsed.r, function(err, details) {
|
||||
handlePayPro(details);
|
||||
});
|
||||
} else {
|
||||
$state.go('tabs.send');
|
||||
// Timeout is required to enable the "Back" button
|
||||
$timeout(function() {
|
||||
if (amount) {
|
||||
$state.transitionTo('tabs.send.confirm', {toAmount: amount, toAddress: addr, description:message});
|
||||
} else {
|
||||
$state.transitionTo('tabs.send.amount', {toAddress: addr});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return true;
|
||||
|
||||
// Plain URL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue