Skip to content

chore: update swaps blockedList api url#24837

Merged
micaelae merged 3 commits intodevelopfrom
mb843-blocked-tokens-update
Jun 7, 2024
Merged

chore: update swaps blockedList api url#24837
micaelae merged 3 commits intodevelopfrom
mb843-blocked-tokens-update

Conversation

@micaelae
Copy link
Copy Markdown
Member

@micaelae micaelae commented May 28, 2024

Description

This is a follow-up to the initial Swap+Send blocklist implementation. This change shifts traffic from swaps-api to token-api by changing the fetched blocklist API.

Open in GitHub Codespaces

Related issues

Fixes: N/A

Manual testing steps

  1. Attempting to swap+send 1 ETH to BNB should not be possible
  2. Attempting to swap+send 1 BNB to ETH should not be possible
  3. Network tab in dev console should show calls to the token-api blocklist endpoint, not swaps

Screenshots/Recordings

Blocklisting should function identically to the old behavior.

Before

N/A

After

N/A

Pre-merge author checklist

  • [X ] I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • 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.

@micaelae micaelae requested review from BZahory and ejwessel May 28, 2024 17:19
@micaelae micaelae requested a review from a team as a code owner May 28, 2024 17:19
@codecov
Copy link
Copy Markdown

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Project coverage is 65.38%. Comparing base (af8ef25) to head (c11c05d).

Current head c11c05d differs from pull request most recent head f56c452

Please upload reports for the commit f56c452 to get more accurate results.

Files Patch % Lines
shared/lib/swaps-utils.js 57.14% 3 Missing ⚠️
ui/ducks/send/send.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24837      +/-   ##
===========================================
- Coverage    65.67%   65.38%   -0.28%     
===========================================
  Files         1359     1352       -7     
  Lines        54015    53992      -23     
  Branches     14017    14016       -1     
===========================================
- Hits         35469    35301     -168     
- Misses       18546    18691     +145     

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

@micaelae micaelae requested a review from a team as a code owner May 29, 2024 20:45
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [8f63666]
Page Load Metrics (659 ± 481 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint73136101168
domContentLoaded10381473
load6326346591002481
domInteractive10381473
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 161 Bytes (0.00%)

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [8f63666]
Page Load Metrics (659 ± 481 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint73136101168
domContentLoaded10381473
load6326346591002481
domInteractive10381473
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 161 Bytes (0.00%)

@micaelae micaelae force-pushed the mb843-blocked-tokens-update branch from 8f63666 to 3101731 Compare June 3, 2024 20:55
ejwessel
ejwessel previously approved these changes Jun 3, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [3101731]
Page Load Metrics (115 ± 145 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint60164782210
domContentLoaded8141011
load401432115302145
domInteractive814911

BZahory
BZahory previously approved these changes Jun 4, 2024
@micaelae micaelae added the team-bridge-deprecated DEPRECATED: please use "team-swaps-and-bridge" instead label Jun 4, 2024
@micaelae micaelae changed the title [METABRIDGE-843] chore: update swaps blockedList api url chore: update swaps blockedList api url Jun 4, 2024
@micaelae micaelae force-pushed the mb843-blocked-tokens-update branch 2 times, most recently from c553f57 to 1f0e90d Compare June 4, 2024 18:14
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [1f0e90d]
Page Load Metrics (49 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6811981115
domContentLoaded9111010
load42804994
domInteractive9111010
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 161 Bytes (0.00%)

Copy link
Copy Markdown
Contributor

@danjm danjm left a comment

Choose a reason for hiding this comment

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

We will have to discuss the comment I made above tomorrow https://github.com/MetaMask/metamask-extension/pull/24837/files#r1626588451

@micaelae micaelae force-pushed the mb843-blocked-tokens-update branch 2 times, most recently from 04d9d5d to 2427c74 Compare June 5, 2024 21:04
@micaelae micaelae dismissed stale reviews from BZahory and ejwessel via 8ad0f7d June 5, 2024 21:06
@micaelae micaelae force-pushed the mb843-blocked-tokens-update branch from 8ad0f7d to c11c05d Compare June 5, 2024 22:19
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [c11c05d]
Page Load Metrics (48 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint61997794
domContentLoaded8221031
load40734884
domInteractive8221031
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 51 Bytes (0.00%)
  • common: 194 Bytes (0.00%)

BZahory
BZahory previously approved these changes Jun 6, 2024
@gauthierpetetin gauthierpetetin added release-12.0.0 Issue or pull request that will be included in release 12.0.0 and removed release-11.18.0 labels Jun 6, 2024
@micaelae micaelae force-pushed the mb843-blocked-tokens-update branch from f56c452 to 687d839 Compare June 6, 2024 18:47
@micaelae micaelae requested a review from danjm June 6, 2024 18:49
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [687d839]
Page Load Metrics (42 ± 1 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint66857463
domContentLoaded810900
load41484211
domInteractive810910
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 51 Bytes (0.00%)
  • common: 194 Bytes (0.00%)

@micaelae micaelae merged commit a2e6bcc into develop Jun 7, 2024
@micaelae micaelae deleted the mb843-blocked-tokens-update branch June 7, 2024 17:33
@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.0.0 Issue or pull request that will be included in release 12.0.0 release-12.1.0 Issue or pull request that will be included in release 12.1.0 team-bridge-deprecated DEPRECATED: please use "team-swaps-and-bridge" instead

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants