diff --git a/ui/app/helpers/utils/transactions.util.js b/ui/app/helpers/utils/transactions.util.js index 49f4f86c0..15877e055 100644 --- a/ui/app/helpers/utils/transactions.util.js +++ b/ui/app/helpers/utils/transactions.util.js @@ -49,8 +49,7 @@ async function getMethodFrom4Byte (fourBytePrefix) { return null } } - -const registry = new MethodRegistry({ provider: global.ethereumProvider }) +let registry /** * Attempts to return the method data from the MethodRegistry library, the message registry library and the token abi, in that order of preference @@ -64,6 +63,10 @@ export async function getMethodDataAsync (fourBytePrefix) { return null }) + if (!registry) { + registry = new MethodRegistry({ provider: global.ethereumProvider }) + } + let sig = await registry.lookup(fourBytePrefix) if (!sig) {