Feat: new setting to notify when a transaction is confirmed
This commit is contained in:
parent
f9125e1193
commit
c9cdd91741
6 changed files with 46 additions and 9 deletions
|
|
@ -12,6 +12,11 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
|
|||
value: config.pushNotificationsEnabled
|
||||
};
|
||||
|
||||
var isNotifyTxEnabled = config.notifyIfTxConfirmed ? config.notifyIfTxConfirmed.enabled : false;
|
||||
$scope.notifyIfTxConfirmed = {
|
||||
value: isNotifyTxEnabled
|
||||
};
|
||||
|
||||
$scope.latestEmail = {
|
||||
value: emailService.getEmailIfEnabled()
|
||||
};
|
||||
|
|
@ -42,6 +47,18 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
|
|||
});
|
||||
};
|
||||
|
||||
$scope.notifyIfTxConfirmedChange = function() {
|
||||
if (!$scope.pushNotifications) return;
|
||||
var opts = {
|
||||
notifyIfTxConfirmed: {
|
||||
enabled: $scope.notifyIfTxConfirmed.value
|
||||
}
|
||||
};
|
||||
configService.set(opts, function(err) {
|
||||
if (err) $log.debug(err);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.emailNotificationsChange = function() {
|
||||
var opts = {
|
||||
enabled: $scope.emailNotifications.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue