to address

This commit is contained in:
Matias Alejo Garcia 2016-08-24 19:31:07 -03:00
commit 3721da05a5
No known key found for this signature in database
GPG key ID: 02470DB551277AB3

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $ionicModal, $log, $timeout, addressbookService, profileService, lodash, $state, walletService ) {
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $ionicModal, $log, $timeout, addressbookService, profileService, lodash, $state, walletService, bitcore ) {
var originalList;
@ -61,7 +61,11 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
}
} else if (/^https?:\/\//.test(search)) {
return $state.go('send.confirm', {paypro: search})
}
} else if (bitcore.Address.isValid(search, 'livenet')) {
return $state.go('send.amount', {toAddress: search})
} else if (bitcore.Address.isValid(search, 'testnet')) {
return $state.go('send.amount', {toAddress: search})
}
if (!search || search.length < 2) {
$scope.list = originalList;