use ui-router non-url params for paypro
This commit is contained in:
parent
2492337600
commit
2fb99dd7c1
4 changed files with 11 additions and 4 deletions
|
|
@ -188,6 +188,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
|||
};
|
||||
|
||||
$scope.finish = function() {
|
||||
console.log('in finish');
|
||||
var _amount = evaluate(format($scope.amount));
|
||||
|
||||
if ($scope.cardId) {
|
||||
|
|
@ -225,13 +226,15 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
|||
});
|
||||
|
||||
} else {
|
||||
console.log('about to transitionTo');
|
||||
var amount = $scope.showAlternativeAmount ? fromFiat(_amount).toFixed(unitDecimals) : _amount.toFixed(unitDecimals);
|
||||
$state.transitionTo('tabs.send.confirm', {
|
||||
isWallet: $scope.isWallet,
|
||||
toAmount: amount * unitToSatoshi,
|
||||
toAddress: $scope.toAddress,
|
||||
toName: $scope.toName,
|
||||
toEmail: $scope.toEmail
|
||||
toEmail: $scope.toEmail//,
|
||||
//paypro: {hi: 'there'}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -261,7 +261,9 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
|
||||
txp.outputs = outputs;
|
||||
txp.message = description;
|
||||
txp.payProUrl = paypro.url;
|
||||
if(paypro) {
|
||||
txp.payProUrl = paypro.url;
|
||||
}
|
||||
txp.excludeUnconfirmedUtxos = config.spendUnconfirmed ? false : true;
|
||||
txp.feeLevel = config.settings && config.settings.feeLevel ? config.settings.feeLevel : 'normal';
|
||||
txp.dryRun = dryRun;
|
||||
|
|
|
|||
|
|
@ -260,13 +260,14 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
})
|
||||
.state('tabs.send.confirm', {
|
||||
url: '/confirm/:isWallet/:toAddress/:toName/:toAmount/:toEmail/:description/{paypro:json}',
|
||||
url: '/confirm/:isWallet/:toAddress/:toName/:toAmount/:toEmail/:description',
|
||||
views: {
|
||||
'tab-send@tabs': {
|
||||
controller: 'confirmController',
|
||||
templateUrl: 'views/confirm.html'
|
||||
}
|
||||
}
|
||||
},
|
||||
params: { paypro: null }
|
||||
})
|
||||
.state('tabs.send.addressbook', {
|
||||
url: '/addressbook/add/:fromSendTab/:addressbookEntry',
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
}
|
||||
|
||||
data = sanitizeUri(data);
|
||||
//data = 'msEVvmpiFEtXv3MdsFLUYMbnNLeNYrqBEA';
|
||||
|
||||
// BIP21
|
||||
if (bitcore.URI.isValid(data)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue