1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts
Mark Stacey 360d8ded1f
Fix exception upon failure to get next nonce (#9598)
An attempt to safely release the `nonceLock` upon failure has instead
made failure worse by masking it with a new error. If the call to get
the `nonceLock` throws an exception, then the `finally` block here
would attempt to call `releaseLock` on the `nonceLock` variable, which
is guaranteed to be `undefined` if the previous call failed. The
attempt to call a method on `undefined` throws another error, masking
the original error.

It is safer to obtain the `nonceLock` and release it without using any
`try` or `finally` block. The `nonceLock` is synchronously released
immediately after it is obtained, and any errors bubble up correctly
without being masked. There is no case where the lock is left
unreleased.
2020-10-14 13:34:08 -02:30
..
account-import-strategies
controllers Add data point to 'Swaps Completed' segment event: estimated vs used gas (#9571) 2020-10-13 16:11:26 -02:30
lib Fix signTypedData_v4 chainId param validation (#9552) 2020-10-12 12:10:19 -07:00
migrations Migrate 'localhost' tokens (#9570) 2020-10-13 07:07:00 -07:00
platforms Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
background.js Remove localhost provider type (#9551) 2020-10-12 12:05:40 -07:00
chromereload.js
contentscript.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
first-time-state.js Remove localhost provider type (#9551) 2020-10-12 12:05:40 -07:00
inpage.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
metamask-controller.js Fix exception upon failure to get next nonce (#9598) 2020-10-14 13:34:08 -02:30
phishing-detect.js
ui.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30