1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 23:58:06 +01:00
metamask-extension/ui/lib
bguiz 96929d99c0 fix: handle trailing / in block explorer URLs
What

- modify `ui/app/helpers/utils/transactions.util.js` and
  `ui/lib/account-link.js` to strip trailing slashes
  if they are present.
- added relevant tests not just for the new scenario,
  but also the general scenarios for these functions,
  as there previously was no test coverage for these
  two functions.

Why

- Current behaviour, when user enters a block explorer URL
  when configuring a custom RPC, and that block explorer URL
  contains a trailing `/`.
  - e.g. `https://block.explorer/`
  - this results in a double-slash (`//`) in the transaction
    and account URLs generated by MetaMask.
  - e.g. `https://block.explorer/tx/0xabcd...`,
    `https://block.explorer/account/0xabcd...`
  - This needs to be handled using a router redirect
    on the server of the block explorer,
    and this changes would avoid that requirement.
2020-05-14 17:15:17 +08:00
..
account-link.js fix: handle trailing / in block explorer URLs 2020-05-14 17:15:17 +08:00
etherscan-prefix-for-network.js Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
icon-factory.js Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
is-mobile-view.js Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
local-storage-helpers.js Prevent accidental use of globals (#8340) 2020-04-15 14:23:27 -03:00
shallow-with-context.js Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
test-timeout.js Check for unused function arguments (#6583) 2019-05-08 15:51:33 -04:00
tx-helper.js Implementation encrypt/decrypt feature (#7831) 2020-02-19 14:24:16 -04:00
webcam-utils.js Enable arrow-parens ESLint rule 2020-02-15 17:04:21 -03:30