reject button working
This commit is contained in:
parent
3c7c24de49
commit
b6280348e5
6 changed files with 99 additions and 49 deletions
|
|
@ -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'};
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue