reject button working

This commit is contained in:
Matias Alejo Garcia 2014-04-23 02:01:54 -03:00
commit b6280348e5
6 changed files with 99 additions and 49 deletions

View file

@ -23,16 +23,15 @@ angular.module('copay.send').controller('SendController',
var w = $rootScope.wallet;
w.createTx( address, amount,function() {
// reset fields
$scope.address = null;
$scope.amount = null;
form.address.$pristine = true;
form.amount.$pristine = true;
$rootScope.flashMessage = { message: 'The transaction proposal has been created', type: 'success'};
$rootScope.$digest();
});
// reset fields
$scope.address = null;
$scope.amount = null;
form.address.$pristine = true;
form.amount.$pristine = true;
// TODO: check if createTx has an error.
$rootScope.flashMessage = { message: 'Your transaction proposal has been sent successfully', type: 'success'};
};
});

View file

@ -70,5 +70,14 @@ angular.module('copay.transactions').controller('TransactionsController',
}
};
$scope.reject = function (ntxid) {
var w = $rootScope.wallet;
w.reject(ntxid);
$rootScope.flashMessage = {type:'warning', message: 'Transaction rejected by you'};
_updateTxs();
$rootScope.$digest();
};
_updateTxs();
});