mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #178 from gabrielbazan7/fix/preferencesEmail
fix email
This commit is contained in:
commit
a8568db32e
|
@ -11,7 +11,7 @@
|
|||
<div class="card list">
|
||||
<label class="item item-input item-stacked-label">
|
||||
<span class="input-label" transalate>Email for wallet notifications</span>
|
||||
<input type="email" id="email" name="email" ng-model="email" required></input>
|
||||
<input type="email" id="email" name="email" ng-model="email.value" required></input>
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit"
|
||||
|
|
|
@ -7,16 +7,18 @@ angular.module('copayApp.controllers').controller('preferencesEmailController',
|
|||
|
||||
var config = configService.getSync();
|
||||
config.emailFor = config.emailFor || {};
|
||||
$scope.email = config.emailFor && config.emailFor[walletId];
|
||||
$scope.email = {
|
||||
value: config.emailFor && config.emailFor[walletId]
|
||||
};
|
||||
|
||||
$scope.save = function(form) {
|
||||
$scope.save = function() {
|
||||
var opts = {
|
||||
emailFor: {}
|
||||
};
|
||||
opts.emailFor[walletId] = $scope.email;
|
||||
opts.emailFor[walletId] = $scope.email.value;
|
||||
|
||||
walletService.updateRemotePreferences(wallet, {
|
||||
email: $scope.email,
|
||||
email: $scope.email.value,
|
||||
}, function(err) {
|
||||
if (err) $log.warn(err);
|
||||
configService.set(opts, function(err) {
|
||||
|
|
Loading…
Reference in New Issue