show warning if non prefixed qr scanned

This commit is contained in:
Kadir Sekha 2018-02-28 16:17:15 +05:00
commit 8d4bf711eb

View file

@ -28,11 +28,16 @@ angular.module('copayApp.directives')
externalLinkService.open(url);
};
scope.sendPaymentToAddress = function(bitcoinAddress) {
var noPrefixInAddress = 0;
if (bitcoinAddress.toLowerCase().indexOf('bitcoin') < 0) {
noPrefixInAddress = 1;
}
scope.showMenu = false;
$state.go('tabs.send').then(function() {
$timeout(function() {
$state.transitionTo('tabs.send.amount', {
toAddress: bitcoinAddress
toAddress: bitcoinAddress,
noPrefix: noPrefixInAddress
});
}, 50);
});