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

chore: poll for bridge quotes #28029

Merged
merged 2 commits into from
Oct 30, 2024
Merged

chore: poll for bridge quotes #28029

merged 2 commits into from
Oct 30, 2024

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Oct 22, 2024

Description

Changes:

  • Import the polling controller package and update lavamoat
  • Modify the BridgeController to extend the StaticIntervalPollingController. This is needed for polling bridge-api quotes once a valid quote request has been entered by a user

Open in GitHub Codespaces

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMS-1448

Manual testing steps

  1. Set BRIDGE_USE_DEV_APIS=1 in .metamaskrc
  2. Open background network tab
  3. Request bridge quotes in the extension
  4. Verify that a getQuote network request is made with the specified parameters

Screenshots/Recordings

Before

N/A

After

Screen.Recording.2024-10-21.at.4.39.47.PM.mov

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.

@micaelae micaelae changed the base branch from develop to mb891-2-quote-request-params October 22, 2024 22:45
@micaelae micaelae marked this pull request as ready for review October 23, 2024 00:21
@micaelae micaelae requested review from a team as code owners October 23, 2024 00:21
@metamaskbot
Copy link
Collaborator

Builds ready [9f1f4a4]
Page Load Metrics (2275 ± 100 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint43428942180452217
domContentLoaded189228232239208100
load194228812275209100
domInteractive18198583617
backgroundConnect882332613
firstReactRender643251406431
getState692352813
initialActions01000
loadScripts13161906163715173
setupStore1285322512
uiStartup218932642573283136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 20.39 KiB (0.46%)
  • ui: 1.2 KiB (0.02%)
  • common: -121 Bytes (-0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [9f1f4a4]
Page Load Metrics (2275 ± 100 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint43428942180452217
domContentLoaded189228232239208100
load194228812275209100
domInteractive18198583617
backgroundConnect882332613
firstReactRender643251406431
getState692352813
initialActions01000
loadScripts13161906163715173
setupStore1285322512
uiStartup218932642573283136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 20.39 KiB (0.46%)
  • ui: 1.2 KiB (0.02%)
  • common: -121 Bytes (-0.00%)

ejwessel
ejwessel previously approved these changes Oct 23, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [dc7a5d2]
Page Load Metrics (1979 ± 52 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint35921731916372178
domContentLoaded17522116194410148
load17612176197910952
domInteractive207846188
backgroundConnect8100282512
firstReactRender552151174220
getState663262110
initialActions01000
loadScripts1316159014518742
setupStore1175302211
uiStartup19762750223716177
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 20.39 KiB (0.47%)
  • ui: 1.2 KiB (0.02%)
  • common: -121 Bytes (-0.00%)

BridgeControllerEvents,
never,
AccountsControllerGetSelectedAccountAction['type'],
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest the following for readability purposes

type AllowedActions =  AccountsControllerGetSelectedAccountAction['type']
type AllowedEvents = never

export type BridgeControllerMessenger = RestrictedControllerMessenger<
  typeof BRIDGE_CONTROLLER_NAME,
  BridgeControllerActions | AccountsControllerGetSelectedAccountAction,
  BridgeControllerEvents,
  AllowedActions,
  AllowedEvents
>

@micaelae micaelae changed the base branch from mb891-2-quote-request-params to develop October 28, 2024 20:40
@micaelae micaelae dismissed ejwessel’s stale review October 28, 2024 20:40

The base branch was changed.

@micaelae micaelae changed the base branch from develop to mb891-2-quote-request-params October 28, 2024 20:40
@metamaskbot
Copy link
Collaborator

Builds ready [9c78fb2]
Page Load Metrics (2095 ± 98 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint28421941880530254
domContentLoaded184328992074207100
load18552907209520598
domInteractive169152189
backgroundConnect76520178
firstReactRender551691122210
getState567262412
initialActions01000
loadScripts13262155150617082
setupStore1372312512
uiStartup209832072328219105
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 18.66 KiB (0.42%)
  • ui: 1.17 KiB (0.02%)
  • common: -121 Bytes (-0.00%)

infiniteflower
infiniteflower previously approved these changes Oct 29, 2024
ejwessel
ejwessel previously approved these changes Oct 29, 2024
Base automatically changed from mb891-2-quote-request-params to develop October 29, 2024 21:09
@micaelae micaelae dismissed stale reviews from ejwessel and infiniteflower October 29, 2024 21:09

The base branch was changed.

@metamaskbot
Copy link
Collaborator

Builds ready [bf5166a]
Page Load Metrics (1983 ± 80 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint28924121831540259
domContentLoaded17502355195016278
load17842412198316680
domInteractive198350167
backgroundConnect7116343014
firstReactRender581751002613
getState560302110
initialActions00000
loadScripts12581808143113364
setupStore1275272010
uiStartup20022663220418287
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 25.45 KiB (0.57%)
  • ui: 0 Bytes (0.00%)
  • common: 468 Bytes (0.01%)

@micaelae micaelae added this pull request to the merge queue Oct 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2024
@micaelae micaelae added this pull request to the merge queue Oct 30, 2024
Merged via the queue into develop with commit 7e765c3 Oct 30, 2024
76 checks passed
@micaelae micaelae deleted the mb891-3-quote-polling branch October 30, 2024 15:06
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.7.0 Issue or pull request that will be included in release 12.7.0 team-bridge
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants