diff options
Diffstat (limited to 'app/scripts/lib/config-manager.js')
-rw-r--r-- | app/scripts/lib/config-manager.js | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index 121ede838..682b34637 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -47,6 +47,15 @@ ConfigManager.prototype.setConfig = function(config) { this.setData(data) } +ConfigManager.prototype.setRpcTarget = function(rpcUrl) { + var config = this.getConfig() + config.provider = { + type: 'rpc', + rpcTarget: rpcUrl, + } + this.setConfig(config) +} + ConfigManager.prototype.getConfig = function() { var data = this.migrator.getData() if ('config' in data) { @@ -61,28 +70,6 @@ ConfigManager.prototype.getConfig = function() { } } -ConfigManager.prototype.setRpcTarget = function(rpcUrl) { - var config = this.getConfig() - config.provider = { - type: 'rpc', - rpcTarget: rpcUrl, - } - this.setConfig(config) -} - -ConfigManager.prototype.useEtherscanProvider = function() { - var config = this.getConfig() - config.provider = { - type: 'etherscan', - } - this.setConfig(config) -} - -ConfigManager.prototype.getProvider = function() { - var config = this.getConfig() - return config.provider -} - ConfigManager.prototype.setData = function(data) { this.migrator.saveData(data) } |