Added page and controller to select wallet
This commit is contained in:
parent
f1005625dd
commit
bacea69cb3
6 changed files with 97 additions and 2 deletions
25
js/controllers/paymentIntent.js
Normal file
25
js/controllers/paymentIntent.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
|
||||
var bitcore = require('bitcore');
|
||||
|
||||
angular.module('copayApp.controllers').controller('PaymentIntentController', function($rootScope, $scope, $routeParams, $timeout, $location, controllerUtils) {
|
||||
|
||||
|
||||
$rootScope.title = 'Select the wallet that you will use to spend your bitcoins';
|
||||
$scope.wallets = [];
|
||||
|
||||
var wids = _.pluck($rootScope.iden.listWallets(), 'id');
|
||||
_.each(wids, function(wid) {
|
||||
var w = $rootScope.iden.getWalletById(wid);
|
||||
$scope.wallets.push(w);
|
||||
controllerUtils.updateBalance(w, function() {
|
||||
$rootScope.$digest();
|
||||
});
|
||||
});
|
||||
|
||||
$scope.switchWallet = function(wid) {
|
||||
//go to send page
|
||||
controllerUtils.setPaymentWallet(wid);
|
||||
};
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue