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