redefined logic to use wallet name only if not present alias available
This commit is contained in:
parent
781604da90
commit
6ee9fbe77c
2 changed files with 2 additions and 8 deletions
|
|
@ -7,6 +7,7 @@ angular.module('copayApp.controllers').controller('preferencesAliasController',
|
|||
var config = configService.getSync();
|
||||
|
||||
$scope.walletName = wallet.credentials.walletName;
|
||||
$scope.walletAlias = config.aliasFor[walletId] || wallet.credentials.walletName;
|
||||
$scope.alias = {
|
||||
value: (config.aliasFor && config.aliasFor[walletId]) || wallet.credentials.walletName
|
||||
};
|
||||
|
|
@ -23,11 +24,4 @@ angular.module('copayApp.controllers').controller('preferencesAliasController',
|
|||
$ionicHistory.goBack();
|
||||
});
|
||||
};
|
||||
$scope.valueCheck = function() {
|
||||
if ($scope.alias.value == wallet.credentials.walletName || $scope.alias.value == '') $scope.disableSave = true;
|
||||
else $scope.disableSave = false;
|
||||
};
|
||||
$scope.$watch('alias.value', function(newvalue, oldvalue) {
|
||||
$scope.valueCheck();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
<button type="submit"
|
||||
class="button button-standard button-primary"
|
||||
ng-disabled="disableSave" translate>
|
||||
ng-disabled="aliasForm.$invalid || (alias.value == walletAlias)" translate>
|
||||
Save
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue