aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/config-manager.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-05-23 14:12:28 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-05-24 07:49:57 +0800
commit243eeff7cb0d4c5d613a9250d234f81fdccbbf15 (patch)
tree406aa8da0a12fa542cf85c2838cbf94cc324ddaf /app/scripts/lib/config-manager.js
parent529304c005318852b60bb93846a58d6eb3da2066 (diff)
downloadtangerine-wallet-browser-243eeff7cb0d4c5d613a9250d234f81fdccbbf15.tar
tangerine-wallet-browser-243eeff7cb0d4c5d613a9250d234f81fdccbbf15.tar.gz
tangerine-wallet-browser-243eeff7cb0d4c5d613a9250d234f81fdccbbf15.tar.bz2
tangerine-wallet-browser-243eeff7cb0d4c5d613a9250d234f81fdccbbf15.tar.lz
tangerine-wallet-browser-243eeff7cb0d4c5d613a9250d234f81fdccbbf15.tar.xz
tangerine-wallet-browser-243eeff7cb0d4c5d613a9250d234f81fdccbbf15.tar.zst
tangerine-wallet-browser-243eeff7cb0d4c5d613a9250d234f81fdccbbf15.zip
Fix for tests
Diffstat (limited to 'app/scripts/lib/config-manager.js')
-rw-r--r--app/scripts/lib/config-manager.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index fee8423fa..9c0dffe9c 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -107,6 +107,35 @@ ConfigManager.prototype.getSeedWords = function () {
var data = this.getData()
return data.seedWords
}
+ConfigManager.prototype.setRpcTarget = function (rpcUrl) {
+ var config = this.getConfig()
+ config.provider = {
+ type: 'rpc',
+ rpcTarget: rpcUrl,
+ }
+ this.setConfig(config)
+}
+
+ConfigManager.prototype.setProviderType = function (type) {
+ var config = this.getConfig()
+ config.provider = {
+ type: type,
+ }
+ 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.getCurrentRpcAddress = function () {
var provider = this.getProvider()