mirror of https://github.com/BTCPrivate/copay.git
Merge branch 'ref/design' of https://github.com/bitpay/bitpay-wallet into feature/address_book
This commit is contained in:
commit
52baa52a5c
|
@ -13,7 +13,8 @@
|
||||||
<div class="item item-no-bottom-border" translate>Recipient</div>
|
<div class="item item-no-bottom-border" translate>Recipient</div>
|
||||||
|
|
||||||
<div class="item item-text-wrap item-icon-left bitcoin-address">
|
<div class="item item-text-wrap item-icon-left bitcoin-address">
|
||||||
<gravatar class="send-gravatar" name="{{toName}}" width="30" email="{{toEmail}}"></gravatar>
|
<i ng-if="isWallet" class="icon ion-briefcase size-21"></i>
|
||||||
|
<gravatar ng-if="!isWallet" class="send-gravatar" name="{{toName}}" width="30" email="{{toEmail}}"></gravatar>
|
||||||
<span>{{toName || toAddress}}</span>
|
<span>{{toName || toAddress}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item item-icon-left">
|
<div class="item item-icon-left">
|
||||||
<gravatar class="send-gravatar" name="{{toName}}" width="30" email="{{toEmail}}"></gravatar>
|
<i ng-if="isWallet" class="icon ion-briefcase size-21"></i>
|
||||||
|
<gravatar ng-if="!isWallet" class="send-gravatar" name="{{toName}}" width="30" email="{{toEmail}}"></gravatar>
|
||||||
<span translate>To</span>: {{toAddress}}
|
<span translate>To</span>: {{toAddress}}
|
||||||
<p ng-show="toName">{{toName}}</p>
|
<p ng-show="toName">{{toName}}</p>
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="list card" ng-if="notifications[0]">
|
<div class="list card" ng-if="notifications[0]">
|
||||||
<a class="item item-icon-right item-heading" ui-sref="tabs.activity" translate>
|
<a class="item item-icon-right item-heading" ui-sref="tabs.activity">
|
||||||
Recent Activity
|
<span translate>Recent Activity</span>
|
||||||
<i class="icon nav-item-arrow-right"></i>
|
<i class="icon nav-item-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
<span ng-if="fetchingNotifications" class="item text-center">
|
<span ng-if="fetchingNotifications" class="item text-center">
|
||||||
|
@ -49,8 +49,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="list card" ng-hide="!wallets[0]">
|
<div class="list card" ng-hide="!wallets[0]">
|
||||||
<div class="item item-icon-right item-heading" translate>
|
<div class="item item-icon-right item-heading">
|
||||||
Wallets
|
<span translate>Wallets</span>
|
||||||
<a ui-sref="tabs.add"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
|
<a ui-sref="tabs.add"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<a ng-repeat="wallet in wallets track by $index"
|
<a ng-repeat="wallet in wallets track by $index"
|
||||||
|
|
|
@ -16,12 +16,27 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card" ng-if="list[0]">
|
<div class="card">
|
||||||
<div class="item item-heading">
|
<div class="item item-icon-right item-heading">
|
||||||
<span translate>Contacts & Wallets</span>
|
<span translate>Contacts</span>
|
||||||
|
<a ui-sref="tabs.send.addressbook"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="item text-center" ng-show="!list[0]" translate>No Wallet - Contact</div>
|
<a class="item item-icon-left ng-hide" ng-show="!hasContacts" ui-sref="tabs.send.addressbook">
|
||||||
<a class="item item-icon-left" ng-repeat="item in list" ng-click="goToAmount(item)">
|
<gravatar class="send-gravatar" name="" width="30" email=""></gravatar>
|
||||||
|
<span translate>Add a Contact</span>
|
||||||
|
</a>
|
||||||
|
<a class="item item-icon-left ng-hide" ng-repeat="item in list" ng-show="hasContacts && !item.isWallet" ng-click="goToAmount(item)">
|
||||||
|
<gravatar class="send-gravatar" name="{{item.name}}" width="30" email="{{item.email}}"></gravatar>
|
||||||
|
{{item.name}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="item item-heading">
|
||||||
|
<span translate>Transfer to Wallet</span>
|
||||||
|
</div>
|
||||||
|
<div class="item text-center ng-hide" ng-show="!hasWallets" translate>No Wallet</div>
|
||||||
|
<a class="item item-icon-left ng-hide" ng-repeat="item in list" ng-show="hasWallets && item.isWallet" ng-click="goToAmount(item)">
|
||||||
<i ng-show="item.isWallet" class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i>
|
<i ng-show="item.isWallet" class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i>
|
||||||
<gravatar class="send-gravatar" ng-show="!item.isWallet" name="{{item.name}}" width="30" email="{{item.email}}"></gravatar>
|
<gravatar class="send-gravatar" ng-show="!item.isWallet" name="{{item.name}}" width="30" email="{{item.email}}"></gravatar>
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
|
|
|
@ -31,7 +31,7 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($scope.fromSendTab) $scope.goHome();
|
if ($scope.fromSendTab) $scope.goHome();
|
||||||
else $state.go('tabs.addressbook');
|
else $ionicHistory.goBack();
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,10 +10,15 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
var SMALL_FONT_SIZE_LIMIT = 13;
|
var SMALL_FONT_SIZE_LIMIT = 13;
|
||||||
var LENGTH_EXPRESSION_LIMIT = 19;
|
var LENGTH_EXPRESSION_LIMIT = 19;
|
||||||
|
|
||||||
|
$scope.isWallet = $stateParams.isWallet;
|
||||||
$scope.toAddress = $stateParams.toAddress;
|
$scope.toAddress = $stateParams.toAddress;
|
||||||
$scope.toName = $stateParams.toName;
|
$scope.toName = $stateParams.toName;
|
||||||
$scope.toEmail = $stateParams.toEmail;
|
$scope.toEmail = $stateParams.toEmail;
|
||||||
|
|
||||||
|
$scope.$on('$ionicView.beforeLeave', function() {
|
||||||
|
angular.element($window).off('keydown');
|
||||||
|
});
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
|
|
||||||
if (!$stateParams.toAddress) {
|
if (!$stateParams.toAddress) {
|
||||||
|
@ -24,7 +29,6 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
var reNr = /^[1234567890\.]$/;
|
var reNr = /^[1234567890\.]$/;
|
||||||
var reOp = /^[\*\+\-\/]$/;
|
var reOp = /^[\*\+\-\/]$/;
|
||||||
|
|
||||||
|
|
||||||
var disableKeys = angular.element($window).on('keydown', function(e) {
|
var disableKeys = angular.element($window).on('keydown', function(e) {
|
||||||
if (e.which === 8) { // you can add others here inside brackets.
|
if (e.which === 8) { // you can add others here inside brackets.
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -46,10 +50,6 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on('$destroy', function() {
|
|
||||||
angular.element($window).off('keydown');
|
|
||||||
});
|
|
||||||
|
|
||||||
var config = configService.getSync().wallet.settings;
|
var config = configService.getSync().wallet.settings;
|
||||||
$scope.unitName = config.unitName;
|
$scope.unitName = config.unitName;
|
||||||
$scope.alternativeIsoCode = config.alternativeIsoCode;
|
$scope.alternativeIsoCode = config.alternativeIsoCode;
|
||||||
|
@ -65,7 +65,6 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
$scope.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals);
|
$scope.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
processAmount($scope.amount);
|
processAmount($scope.amount);
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
|
@ -187,6 +186,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
var amount = $scope.showAlternativeAmount ? fromFiat(_amount).toFixed(unitDecimals) : _amount.toFixed(unitDecimals);
|
var amount = $scope.showAlternativeAmount ? fromFiat(_amount).toFixed(unitDecimals) : _amount.toFixed(unitDecimals);
|
||||||
|
|
||||||
$state.transitionTo('tabs.send.confirm', {
|
$state.transitionTo('tabs.send.confirm', {
|
||||||
|
isWallet: $scope.isWallet,
|
||||||
toAmount: amount * unitToSatoshi,
|
toAmount: amount * unitToSatoshi,
|
||||||
toAddress: $scope.toAddress,
|
toAddress: $scope.toAddress,
|
||||||
toName: $scope.toName,
|
toName: $scope.toName,
|
||||||
|
|
|
@ -4,6 +4,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
var cachedTxp = {};
|
var cachedTxp = {};
|
||||||
var isChromeApp = platformInfo.isChromeApp;
|
var isChromeApp = platformInfo.isChromeApp;
|
||||||
|
|
||||||
|
$scope.isWallet = $stateParams.isWallet;
|
||||||
|
$scope.toAmount = $stateParams.toAmount;
|
||||||
$scope.toAddress = $stateParams.toAddress;
|
$scope.toAddress = $stateParams.toAddress;
|
||||||
$scope.toName = $stateParams.toName;
|
$scope.toName = $stateParams.toName;
|
||||||
$scope.toEmail = $stateParams.toEmail;
|
$scope.toEmail = $stateParams.toEmail;
|
||||||
|
@ -15,15 +17,15 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
});
|
});
|
||||||
|
|
||||||
var initConfirm = function() {
|
var initConfirm = function() {
|
||||||
if ($stateParams.paypro) {
|
if ($scope.paypro) {
|
||||||
return setFromPayPro($stateParams.paypro, function(err) {
|
return setFromPayPro($scope.paypro, function(err) {
|
||||||
if (err && !isChromeApp) {
|
if (err && !isChromeApp) {
|
||||||
popupService.showAlert(gettext('Could not fetch payment'));
|
popupService.showAlert(gettext('Could not fetch payment'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// TODO (URL , etc)
|
// TODO (URL , etc)
|
||||||
if (!$stateParams.toAddress || !$stateParams.toAmount) {
|
if (!$scope.toAddress || !$scope.toAmount) {
|
||||||
$log.error('Bad params at amount')
|
$log.error('Bad params at amount')
|
||||||
throw ('bad params');
|
throw ('bad params');
|
||||||
}
|
}
|
||||||
|
@ -33,7 +35,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
var config = configService.getSync().wallet;
|
var config = configService.getSync().wallet;
|
||||||
$scope.feeLevel = config.settings ? config.settings.feeLevel : '';
|
$scope.feeLevel = config.settings ? config.settings.feeLevel : '';
|
||||||
|
|
||||||
var amount = $scope.toAmount = parseInt($stateParams.toAmount);
|
$scope.toAmount = parseInt($scope.toAmount);
|
||||||
$scope.amountStr = txFormatService.formatAmountStr($scope.toAmount);
|
$scope.amountStr = txFormatService.formatAmountStr($scope.toAmount);
|
||||||
|
|
||||||
var networkName = (new bitcore.Address($scope.toAddress)).network.name;
|
var networkName = (new bitcore.Address($scope.toAddress)).network.name;
|
||||||
|
@ -54,7 +56,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
$log.error(err);
|
$log.error(err);
|
||||||
} else {
|
} else {
|
||||||
if (!status.availableBalanceSat) $log.debug('No balance available in: ' + w.name);
|
if (!status.availableBalanceSat) $log.debug('No balance available in: ' + w.name);
|
||||||
if (status.availableBalanceSat > amount) filteredWallets.push(w);
|
if (status.availableBalanceSat > $scope.toAmount) filteredWallets.push(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++index == wallets.length) {
|
if (++index == wallets.length) {
|
||||||
|
@ -69,7 +71,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
txFormatService.formatAlternativeStr(amount, function(v) {
|
txFormatService.formatAlternativeStr($scope.toAmount, function(v) {
|
||||||
$scope.alternativeAmountStr = v;
|
$scope.alternativeAmountStr = v;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -145,12 +147,13 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
return cb(true);
|
return cb(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$stateParams.toAmount = paypro.amount;
|
$scope.toAmount = paypro.amount;
|
||||||
$stateParams.toAddress = paypro.toAddress;
|
$scope.toAddress = paypro.toAddress;
|
||||||
$stateParams.description = paypro.memo;
|
$scope.description = paypro.memo;
|
||||||
$stateParams.paypro = null;
|
$scope.paypro = null;
|
||||||
|
|
||||||
$scope._paypro = paypro;
|
$scope._paypro = paypro;
|
||||||
|
|
||||||
return initConfirm();
|
return initConfirm();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $ionicHistory, $log, addressbookService) {
|
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $ionicHistory, $log, addressbookService) {
|
||||||
|
|
||||||
if ($scope.cb) $timeout($scope.cb, 100);
|
if ($scope.cb) $timeout($scope.cb, 100);
|
||||||
$scope.fromSendTab = $ionicHistory.viewHistory().backView.stateName === "tabs.send.amount";
|
$scope.fromSendTab = $ionicHistory.viewHistory().backView.stateName === "tabs.send.amount" || "tabs.send";
|
||||||
|
|
||||||
$scope.cancel = function() {
|
$scope.cancel = function() {
|
||||||
$scope.txStatusModal.hide();
|
$scope.txStatusModal.hide();
|
||||||
|
|
|
@ -47,7 +47,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
}, 1);
|
}, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("$ionicView.enter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
if (!$scope.isCordova) $scope.checkTips();
|
if (!$scope.isCordova) $scope.checkTips();
|
||||||
$scope.wallets = profileService.getWallets({
|
$scope.wallets = profileService.getWallets({
|
||||||
onlyComplete: true
|
onlyComplete: true
|
||||||
|
|
|
@ -10,6 +10,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
var wallets = profileService.getWallets({
|
var wallets = profileService.getWallets({
|
||||||
onlyComplete: true
|
onlyComplete: true
|
||||||
});
|
});
|
||||||
|
$scope.hasWallets = lodash.isEmpty(wallets) ? false : true;
|
||||||
|
|
||||||
lodash.each(wallets, function(v) {
|
lodash.each(wallets, function(v) {
|
||||||
originalList.push({
|
originalList.push({
|
||||||
|
@ -25,6 +26,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
addressbookService.list(function(err, ab) {
|
addressbookService.list(function(err, ab) {
|
||||||
if (err) $log.error(err);
|
if (err) $log.error(err);
|
||||||
|
|
||||||
|
$scope.hasContacts = lodash.isEmpty(ab) ? false : true;
|
||||||
var contacts = [];
|
var contacts = [];
|
||||||
lodash.each(ab, function(v, k) {
|
lodash.each(ab, function(v, k) {
|
||||||
contacts.push({
|
contacts.push({
|
||||||
|
@ -76,6 +78,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
}
|
}
|
||||||
$log.debug('Got toAddress:' + addr + ' | ' + item.name);
|
$log.debug('Got toAddress:' + addr + ' | ' + item.name);
|
||||||
return $state.transitionTo('tabs.send.amount', {
|
return $state.transitionTo('tabs.send.amount', {
|
||||||
|
isWallet: item.isWallet,
|
||||||
toAddress: addr,
|
toAddress: addr,
|
||||||
toName: item.name,
|
toName: item.name,
|
||||||
toEmail: item.email
|
toEmail: item.email
|
||||||
|
@ -83,7 +86,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("$ionicView.enter", function(event, data){
|
$scope.$on("$ionicView.beforeEnter", function(event, data){
|
||||||
$scope.formData = { search: null };
|
$scope.formData = { search: null };
|
||||||
updateList();
|
updateList();
|
||||||
});
|
});
|
||||||
|
|
|
@ -237,7 +237,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.state('tabs.send.amount', {
|
.state('tabs.send.amount', {
|
||||||
url: '/amount/:toAddress/:toName/:toEmail',
|
url: '/amount/:isWallet/:toAddress/:toName/:toEmail',
|
||||||
views: {
|
views: {
|
||||||
'tab-send@tabs': {
|
'tab-send@tabs': {
|
||||||
controller: 'amountController',
|
controller: 'amountController',
|
||||||
|
@ -246,7 +246,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.send.confirm', {
|
.state('tabs.send.confirm', {
|
||||||
url: '/confirm/:toAddress/:toName/:toAmount/:toEmail/:description/:paypro',
|
url: '/confirm/:isWallet/:toAddress/:toName/:toAmount/:toEmail/:description/:paypro',
|
||||||
views: {
|
views: {
|
||||||
'tab-send@tabs': {
|
'tab-send@tabs': {
|
||||||
controller: 'confirmController',
|
controller: 'confirmController',
|
||||||
|
@ -628,7 +628,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
url: '/backup/:walletId/:fromOnboarding',
|
url: '/backup/:walletId/:fromOnboarding',
|
||||||
views: {
|
views: {
|
||||||
'onboarding': {
|
'onboarding': {
|
||||||
templateUrl: 'views/backup.html'
|
templateUrl: 'views/backup.html',
|
||||||
|
controller: 'backupController'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.services').factory('incomingData', function($log, $ionicModal, $ionicHistory, $state, $window, $timeout, bitcore) {
|
angular.module('copayApp.services').factory('incomingData', function($log, $ionicModal, $state, $window, $timeout, bitcore) {
|
||||||
|
|
||||||
var root = {};
|
var root = {};
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni
|
||||||
// data extensions for Payment Protocol with non-backwards-compatible request
|
// data extensions for Payment Protocol with non-backwards-compatible request
|
||||||
if ((/^bitcoin:\?r=[\w+]/).exec(data)) {
|
if ((/^bitcoin:\?r=[\w+]/).exec(data)) {
|
||||||
data = decodeURIComponent(data.replace('bitcoin:?r=', ''));
|
data = decodeURIComponent(data.replace('bitcoin:?r=', ''));
|
||||||
$ionicHistory.removeBackView();
|
|
||||||
$state.go('tabs.send');
|
$state.go('tabs.send');
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$state.transitionTo('tabs.send.confirm', {paypro: data});
|
$state.transitionTo('tabs.send.confirm', {paypro: data});
|
||||||
|
@ -46,7 +45,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni
|
||||||
|
|
||||||
var amount = parsed.amount ? parsed.amount : '';
|
var amount = parsed.amount ? parsed.amount : '';
|
||||||
|
|
||||||
$ionicHistory.removeBackView();
|
|
||||||
$state.go('tabs.send');
|
$state.go('tabs.send');
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
if (parsed.r) {
|
if (parsed.r) {
|
||||||
|
@ -63,7 +61,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni
|
||||||
|
|
||||||
// Plain URL
|
// Plain URL
|
||||||
} else if (/^https?:\/\//.test(data)) {
|
} else if (/^https?:\/\//.test(data)) {
|
||||||
$ionicHistory.removeBackView();
|
|
||||||
$state.go('tabs.send');
|
$state.go('tabs.send');
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$state.transitionTo('tabs.send.confirm', {paypro: data});
|
$state.transitionTo('tabs.send.confirm', {paypro: data});
|
||||||
|
@ -72,14 +69,12 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni
|
||||||
|
|
||||||
// Plain Address
|
// Plain Address
|
||||||
} else if (bitcore.Address.isValid(data, 'livenet')) {
|
} else if (bitcore.Address.isValid(data, 'livenet')) {
|
||||||
$ionicHistory.removeBackView();
|
|
||||||
$state.go('tabs.send');
|
$state.go('tabs.send');
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$state.transitionTo('tabs.send.amount', {toAddress: data});
|
$state.transitionTo('tabs.send.amount', {toAddress: data});
|
||||||
}, 100);
|
}, 100);
|
||||||
return true;
|
return true;
|
||||||
} else if (bitcore.Address.isValid(data, 'testnet')) {
|
} else if (bitcore.Address.isValid(data, 'testnet')) {
|
||||||
$ionicHistory.removeBackView();
|
|
||||||
$state.go('tabs.send');
|
$state.go('tabs.send');
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$state.transitionTo('tabs.send.amount', {toAddress: data});
|
$state.transitionTo('tabs.send.amount', {toAddress: data});
|
||||||
|
@ -94,7 +89,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni
|
||||||
|
|
||||||
// Join
|
// Join
|
||||||
} else if (data && data.match(/^copay:[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
|
} else if (data && data.match(/^copay:[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
|
||||||
$ionicHistory.removeBackView();
|
|
||||||
$state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$state.transitionTo('tabs.add.join', {url: data});
|
$state.transitionTo('tabs.add.join', {url: data});
|
||||||
|
@ -103,7 +97,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni
|
||||||
|
|
||||||
// Old join
|
// Old join
|
||||||
} else if (data && data.match(/^[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
|
} else if (data && data.match(/^[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
|
||||||
$ionicHistory.removeBackView();
|
|
||||||
$state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$state.transitionTo('tabs.add.join', {url: data});
|
$state.transitionTo('tabs.add.join', {url: data});
|
||||||
|
|
|
@ -265,7 +265,8 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
function _getStatus(initStatusHash, tries, cb) {
|
function _getStatus(initStatusHash, tries, cb) {
|
||||||
if (isStatusCached() && !opts.force) {
|
if (isStatusCached() && !opts.force) {
|
||||||
$log.debug('Wallet status cache hit:' + wallet.id);
|
$log.debug('Wallet status cache hit:' + wallet.id);
|
||||||
|
cacheStatus(wallet.cachedStatus);
|
||||||
|
processPendingTxps(wallet.cachedStatus);
|
||||||
return cb(null, wallet.cachedStatus);
|
return cb(null, wallet.cachedStatus);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue