Removes Unit from settings
This commit is contained in:
parent
94363704ab
commit
e1aa5cc8f8
5 changed files with 0 additions and 77 deletions
|
|
@ -1,43 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesUnitController', function($scope, $log, configService, $ionicHistory, gettextCatalog, walletService, profileService) {
|
||||
|
||||
var config = configService.getSync();
|
||||
$scope.unitList = [{
|
||||
name: 'bits (1,000,000 bits = 1BTC)',
|
||||
shortName: 'bits',
|
||||
value: 100,
|
||||
decimals: 2,
|
||||
code: 'bit',
|
||||
}, {
|
||||
name: 'BTC',
|
||||
shortName: 'BTC',
|
||||
value: 100000000,
|
||||
decimals: 8,
|
||||
code: 'btc',
|
||||
}];
|
||||
|
||||
$scope.save = function(newUnit) {
|
||||
var opts = {
|
||||
wallet: {
|
||||
settings: {
|
||||
unitName: newUnit.shortName,
|
||||
unitToSatoshi: newUnit.value,
|
||||
unitDecimals: newUnit.decimals,
|
||||
unitCode: newUnit.code,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) $log.warn(err);
|
||||
|
||||
$ionicHistory.goBack();
|
||||
walletService.updateRemotePreferences(profileService.getWallets())
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.currentUnit = config.wallet.settings.unitCode;
|
||||
});
|
||||
});
|
||||
|
|
@ -10,7 +10,6 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
$scope.buyAndSellServices = buyAndSellService.getLinked();
|
||||
|
||||
configService.whenAvailable(function(config) {
|
||||
$scope.unitName = config.wallet.settings.unitName;
|
||||
$scope.selectedAlternative = {
|
||||
name: config.wallet.settings.alternativeName,
|
||||
isoCode: config.wallet.settings.alternativeIsoCode
|
||||
|
|
|
|||
|
|
@ -392,15 +392,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.unit', {
|
||||
url: '/unit',
|
||||
views: {
|
||||
'tab-settings@tabs': {
|
||||
controller: 'preferencesUnitController',
|
||||
templateUrl: 'views/preferencesUnit.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.fee', {
|
||||
url: '/fee',
|
||||
views: {
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
<ion-view class="settings" show-tabs>
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-title>
|
||||
{{'Unit'|translate}}
|
||||
</ion-nav-title>
|
||||
<ion-nav-back-button>
|
||||
</ion-nav-back-button>
|
||||
</ion-nav-bar>
|
||||
<ion-content>
|
||||
<ion-radio ng-repeat="unit in unitList" ng-value="unit.code" ng-model="currentUnit"
|
||||
ng-click="save(unit)">{{unit.shortName}}
|
||||
</ion-radio>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
|
@ -56,16 +56,6 @@
|
|||
</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
<a class="item has-setting-value item-icon-left item-icon-right" ui-sref="tabs.unit">
|
||||
<i class="icon big-icon-svg">
|
||||
<img src="img/icon-unit.svg" class="bg"/>
|
||||
</i>
|
||||
<span class="setting-title">{{'Bitcoin Unit' | translate}}</span>
|
||||
<span class="setting-value">
|
||||
{{unitName}}
|
||||
</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
|
||||
<a class="item has-setting-value item-icon-left item-icon-right" ui-sref="tabs.altCurrency">
|
||||
<i class="icon big-icon-svg">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue