Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update Polygon from MATIC to POL #26671

Merged
merged 30 commits into from
Aug 29, 2024

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Aug 27, 2024

Description

Add POL token image, and maps it to Polygon Network config. See blog post for more context.

Adds chain collision check to not flag POL as scam token

Adds migration to overwrite MATIC ticker to POL

Open in GitHub Codespaces

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMASSETS-362

Manual testing steps

  1. When adding Polygon as a network from FEATURED_RPCS, ticker symbol should be POL
  2. When switching to Polygon Mainnet, ticker should be POL (not MATIC)
  3. Can import Polygon Network Token on Ethereum Mainnet
  4. Can import Matic Network Token on Ethereum Mainnet (backward compatibility)

Note, that both MATIC and POL erc20 tokens can already be imported on Ethereum Mainnet, so this behavior should remain unchanged.

Additionally, when a user upgrades to this build, migration should run and overwrite ticker from MATIC to POL:

  1. Install a previous build (checkout develop and yarn && yarn start should be fine here) -> Polygon Network should show MATIC as ticker. You may need to remove and re-add Polygon Network, as migrations are incremental.
  2. checkout to this branch, yarn && yarn start, migration 128 should run (Running migration 128... in console) -> Polygon Network should show POL as ticker

Screenshots/Recordings

Before:

Screenshot 2024-08-27 at 2 39 15 PM Screenshot 2024-08-27 at 2 39 36 PM

After:

Screenshot 2024-08-27 at 1 47 40 PM Screenshot 2024-08-27 at 1 48 11 PM

Pre-merge author checklist

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.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@gambinish gambinish changed the title Feat/mmassets 362 update polygon native token pol feat: Update polygon native token ticker from MATIC to POL Aug 27, 2024
@gambinish gambinish changed the title feat: Update polygon native token ticker from MATIC to POL feat: Update Polygon from MATIC to POL Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.13%. Comparing base (be04ca8) to head (1866d55).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26671      +/-   ##
===========================================
+ Coverage    70.10%   70.13%   +0.03%     
===========================================
  Files         1416     1417       +1     
  Lines        49396    49440      +44     
  Branches     13802    13833      +31     
===========================================
+ Hits         34628    34672      +44     
  Misses       14768    14768              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Collaborator

Builds ready [3cc4371]
Page Load Metrics (75 ± 8 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint691901002613
domContentLoaded4911272188
load5611275168
domInteractive156031136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1018 Bytes (0.03%)
  • ui: 95 Bytes (0.00%)
  • common: 10 Bytes (0.00%)

@gambinish gambinish marked this pull request as ready for review August 27, 2024 22:26
@gambinish gambinish requested review from a team as code owners August 27, 2024 22:26
@gambinish gambinish requested a review from bergeron August 28, 2024 19:10
@metamaskbot
Copy link
Collaborator

Builds ready [d29c5e9]
Page Load Metrics (2009 ± 97 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint25926021832557268
domContentLoaded17212588198520699
load17292605200920397
domInteractive22190433718
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.4 KiB (0.04%)
  • ui: 95 Bytes (0.00%)
  • common: 10 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [578e1a5]
Page Load Metrics (1677 ± 47 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24020091613328158
domContentLoaded1530188616457938
load1560201716779847
domInteractive147836199
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.95 KiB (0.06%)
  • ui: 95 Bytes (0.00%)
  • common: 10 Bytes (0.00%)

@gambinish gambinish requested a review from Gudahtt August 29, 2024 18:16
@metamaskbot
Copy link
Collaborator

Builds ready [30f88bc]
Page Load Metrics (1827 ± 148 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint44427551773430206
domContentLoaded154626911806300144
load155827521827309148
domInteractive12167373316
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.95 KiB (0.06%)
  • ui: 95 Bytes (0.00%)
  • common: 10 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [2bcf315]
Page Load Metrics (2108 ± 229 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint66430411992524252
domContentLoaded155330162082472227
load159130522108476229
domInteractive23243564924
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.95 KiB (0.06%)
  • ui: 95 Bytes (0.00%)
  • common: 10 Bytes (0.00%)

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@metamaskbot
Copy link
Collaborator

Builds ready [e8491d8]
Page Load Metrics (1837 ± 85 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16082256184418690
domContentLoaded15942164180816077
load16072186183717685
domInteractive128331189
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.95 KiB (0.06%)
  • ui: 95 Bytes (0.00%)
  • common: 10 Bytes (0.00%)

Copy link
Contributor

@garrettbear garrettbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Screenshot 2024-08-29 at 1 33 34 PM

@vinnyhoward
Copy link
Contributor

LGTM✅

Copy link

@bschorchit bschorchit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving on behalf of confirmations to unblock this per this message ("confirmations team is only a codeowner because of an affected test file, but the changes in that file were just related to test fixtures.")

Copy link

sonarcloud bot commented Aug 29, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [1866d55]
Page Load Metrics (1840 ± 98 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint25525921685510245
domContentLoaded16242431181216680
load16392628184020398
domInteractive217039136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.95 KiB (0.06%)
  • ui: 95 Bytes (0.00%)
  • common: 10 Bytes (0.00%)

@gambinish gambinish merged commit 1b4417d into develop Aug 29, 2024
78 checks passed
@gambinish gambinish deleted the feat/mmassets-362_update-polygon-native-token-POL branch August 29, 2024 21:39
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2024
@metamaskbot metamaskbot added the release-12.5.0 Issue or pull request that will be included in release 12.5.0 label Aug 29, 2024
@gauthierpetetin gauthierpetetin added release-12.4.0 Issue or pull request that will be included in release 12.4.0 and removed release-12.5.0 Issue or pull request that will be included in release 12.5.0 labels Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.4.0 Issue or pull request that will be included in release 12.4.0 team-assets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants