metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

fix: add fallback method for currency formatter in `useFiatFormatter` hook

Open OGPoyraz opened this issue 1 year ago • 0 comments

Description

This PR goal is to add a fallback for unknown currency formats to render it ${amount} ${currency} format.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/metamask-extension/issues/24558

Manual testing steps

  1. Go to Settings > General
  2. Change your currency to Storj
  3. Start a send transaction on Ethereum with any value
  4. MM doesn't crash and shows amount storj

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • [x] I’ve followed MetaMask Coding Standards.
  • [x] I've completed the PR template to the best of my ability
  • [x] I’ve included tests if applicable
  • [x] I’ve documented my code using JSDoc format if applicable
  • [X] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

OGPoyraz avatar May 16 '24 13:05 OGPoyraz