diff options
author | HackyMiner <hackyminer@gmail.com> | 2018-09-29 03:53:58 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-09-29 03:53:58 +0800 |
commit | 13a1d4672045371f6366bf1fc48b77cb880eb4f8 (patch) | |
tree | 66b87722afe3b3adc528e71ead28dd007eb16c69 /app/scripts/metamask-controller.js | |
parent | 49a3d52dd6cbfbbdfd700f7a8898516f11e19045 (diff) | |
download | tangerine-wallet-browser-13a1d4672045371f6366bf1fc48b77cb880eb4f8.tar tangerine-wallet-browser-13a1d4672045371f6366bf1fc48b77cb880eb4f8.tar.gz tangerine-wallet-browser-13a1d4672045371f6366bf1fc48b77cb880eb4f8.tar.bz2 tangerine-wallet-browser-13a1d4672045371f6366bf1fc48b77cb880eb4f8.tar.lz tangerine-wallet-browser-13a1d4672045371f6366bf1fc48b77cb880eb4f8.tar.xz tangerine-wallet-browser-13a1d4672045371f6366bf1fc48b77cb880eb4f8.tar.zst tangerine-wallet-browser-13a1d4672045371f6366bf1fc48b77cb880eb4f8.zip |
support editable customRPC (#5267)
* support editable customRPC #5246
* remove rpcList size restriction
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r-- | app/scripts/metamask-controller.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 123e17569..1f0527c7e 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -376,6 +376,7 @@ module.exports = class MetamaskController extends EventEmitter { // network management setProviderType: nodeify(networkController.setProviderType, networkController), setCustomRpc: nodeify(this.setCustomRpc, this), + delCustomRpc: nodeify(this.delCustomRpc, this), // PreferencesController setSelectedAddress: nodeify(preferencesController.setSelectedAddress, preferencesController), @@ -1440,6 +1441,14 @@ module.exports = class MetamaskController extends EventEmitter { } /** + * A method for deleting a selected custom URL. + * @param {string} rpcTarget - A RPC URL to delete. + */ + async delCustomRpc (rpcTarget) { + await this.preferencesController.updateFrequentRpcList(rpcTarget, true) + } + + /** * Sets whether or not to use the blockie identicon format. * @param {boolean} val - True for bockie, false for jazzicon. * @param {Function} cb - A callback function called when complete. |