1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/test/unit
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
..
actions Export each action constant directly (#8536) 2020-05-06 16:26:09 -02:30
app Delete retryTransaction action and background (#8576) 2020-05-12 16:19:33 -07:00
lib fix: handle trailing / in block explorer URLs 2020-05-14 17:15:17 +08:00
migrations Delete Dai/Sai migration notification (#8418) 2020-04-27 16:23:43 -02:30
responsive/components Remove redux-test-utils dependency (#8070) 2020-02-18 14:54:03 -03:30
ui Add switch to connected account alert (#8532) 2020-05-12 10:01:52 -03:00
balance-formatter-test.js Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
localhostState.js Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30