diff options
author | Esteban MiƱo <efmino@uc.cl> | 2019-01-23 02:22:56 +0800 |
---|---|---|
committer | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2019-01-23 02:22:56 +0800 |
commit | e21dfd18622dd7f70dac51855a0052a56fb74e57 (patch) | |
tree | 03fe6571c87474c15af266fa0e3bc9c1a755c450 /ui/app/actions.js | |
parent | fe780fb3d457dd22be84cf7ef386327ba9a2ec93 (diff) | |
download | tangerine-wallet-browser-e21dfd18622dd7f70dac51855a0052a56fb74e57.tar tangerine-wallet-browser-e21dfd18622dd7f70dac51855a0052a56fb74e57.tar.gz tangerine-wallet-browser-e21dfd18622dd7f70dac51855a0052a56fb74e57.tar.bz2 tangerine-wallet-browser-e21dfd18622dd7f70dac51855a0052a56fb74e57.tar.lz tangerine-wallet-browser-e21dfd18622dd7f70dac51855a0052a56fb74e57.tar.xz tangerine-wallet-browser-e21dfd18622dd7f70dac51855a0052a56fb74e57.tar.zst tangerine-wallet-browser-e21dfd18622dd7f70dac51855a0052a56fb74e57.zip |
Use Parity on-chain registry only when is needed (#6052)
* add and use knownMethodData to avoid infura requests
* dataMethod to methodData and check empty response
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 5a4389d67..7cc88e2b3 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -236,6 +236,7 @@ var actions = { removeToken, updateTokens, removeSuggestedTokens, + addKnownMethodData, UPDATE_TOKENS: 'UPDATE_TOKENS', setRpcTarget: setRpcTarget, delRpcTarget: delRpcTarget, @@ -1490,7 +1491,6 @@ const backgroundSetLocked = () => { if (error) { return reject(error) } - resolve() }) }) @@ -1721,6 +1721,12 @@ function removeSuggestedTokens () { } } +function addKnownMethodData (fourBytePrefix, methodData) { + return (dispatch) => { + background.addKnownMethodData(fourBytePrefix, methodData) + } +} + function updateTokens (newTokens) { return { type: actions.UPDATE_TOKENS, |