Fix Conflicts:

js/models/core/Wallet.js
This commit is contained in:
Gustavo Cortez 2014-06-19 16:43:34 -03:00
commit 47dcc12910
19 changed files with 557 additions and 350 deletions

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('HeaderController',
function($scope, $rootScope, $location, $notification, $http, controllerUtils) {
function($scope, $rootScope, $location, notification, $http, controllerUtils) {
$scope.menu = [
{
'title': 'Addresses',
@ -64,7 +64,7 @@ angular.module('copayApp.controllers').controller('HeaderController',
}
if (currentAddr) {
//var beep = new Audio('sound/transaction.mp3');
$notification.funds('Received fund', currentAddr, receivedFund);
notification.funds('Received fund', currentAddr, receivedFund);
//beep.play();
}
}
@ -72,7 +72,7 @@ angular.module('copayApp.controllers').controller('HeaderController',
$rootScope.$watch('txAlertCount', function(txAlertCount) {
if (txAlertCount && txAlertCount > 0) {
$notification.info('New Transaction', ($rootScope.txAlertCount == 1) ? 'You have a pending transaction proposal' : 'You have ' + $rootScope.txAlertCount + ' pending transaction proposals', txAlertCount);
notification.info('New Transaction', ($rootScope.txAlertCount == 1) ? 'You have a pending transaction proposal' : 'You have ' + $rootScope.txAlertCount + ' pending transaction proposals', txAlertCount);
}
});

View file

@ -6,21 +6,16 @@ angular.module('copayApp.controllers').controller('ImportController',
var reader = new FileReader();
var _importBackup = function(encryptedObj) {
Passphrase.getBase64Async($scope.password, function(passphrase){
var w, errMsg;
try {
w = walletFactory.fromEncryptedObj(encryptedObj, passphrase);
} catch(e) {
errMsg = e.message;
}
if (!w) {
$scope.loading = false;
$rootScope.$flashMessage = { message: errMsg || 'Wrong password', type: 'error'};
$rootScope.$digest();
return;
}
$rootScope.wallet = w;
controllerUtils.startNetwork($rootScope.wallet, $scope);
walletFactory.import(encryptedObj, passphrase, function(err, w) {
if (err) {
$scope.loading = false;
$rootScope.$flashMessage = { message: err.errMsg || 'Wrong password', type: 'error'};
$rootScope.$digest();
return;
}
$rootScope.wallet = w;
controllerUtils.startNetwork($rootScope.wallet, $scope);
});
});
};