-
Notifications
You must be signed in to change notification settings - Fork 5k
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: wire up bridge input actions [METABRIDGE-866] #25813
Conversation
3a22d69
to
21b3f54
Compare
3662d50
to
235fd33
Compare
21b3f54
to
a74b678
Compare
0b673a9
to
eccc944
Compare
3cfba29
to
7d640ae
Compare
a74b678
to
b41d339
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request introduces controller and Redux methods for managing bridge page input fields, enhancing the bridge functionality by allowing dynamic updates based on user input.
app/scripts/controllers/bridge.ts
: Added methods to fetch and update tokens and top assets for selected networks.ui/ducks/bridge/actions.ts
: Introduced actions to set source and destination chains, ensuring Redux state sync.ui/ducks/bridge/selectors.ts
: Added new selectors for managing bridge state, leveraging reselect for memoization.ui/hooks/bridge/useBridging.ts
: Updated hook to usecurrentProviderConfig
for bridging functionality.test/e2e/tests/bridge/constants.ts
: Added feature flags for allowed source and destination networks.
16 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
b41d339
to
7eb09c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This pull request introduces controller and Redux methods for managing bridge page input fields, enhancing the bridge functionality by allowing dynamic updates based on user input.
app/scripts/controllers/bridge.ts
: Added methods to fetch and update tokens and top assets for selected networks.ui/ducks/bridge/actions.ts
: Introduced actions to set source and destination chains, ensuring Redux state sync.ui/ducks/bridge/selectors.ts
: Added new selectors for managing bridge state, leveraging reselect for memoization.ui/hooks/bridge/useBridging.ts
: Updated hook to usecurrentProviderConfig
for bridging functionality.test/e2e/tests/bridge/constants.ts
: Added feature flags for allowed source and destination networks.
25 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
7eb09c0
to
3c05d7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This pull request introduces controller and Redux methods for managing bridge page input fields, enhancing the bridge functionality by allowing dynamic updates based on user input.
app/scripts/controllers/bridge.ts
: Added methods to fetch and update tokens and top assets for selected networks.test/e2e/tests/bridge/constants.ts
: Introduced new feature flags for source and destination network allowlists.test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json
: UpdatedBridgeController
state with new properties for tokens and top assets.test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json
: Added new properties tobridgeState
for managing network and token data.test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json
: Similar updates as theerrors-after-init
file, ensuring consistency in state management.
6 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This pull request introduces controller and Redux methods for managing bridge page input fields, enhancing the bridge functionality by allowing dynamic updates based on user input.
test/e2e/tests/bridge/bridge-test-utils.ts
: Added mock server response for the portfolio bridge endpoint to ensure proper handling in e2e tests.test/e2e/tests/swap-send/swap-send-test-utils.ts
: Introduced new utility functions to support Swap and Send page's end-to-end tests, enhancing test coverage and robustness.
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Builds ready [353ab3b]
Page Load Metrics (134 ± 141 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This pull request introduces controller and Redux methods for managing bridge page input fields, enhancing the bridge functionality by allowing dynamic updates based on user input.
app/scripts/controllers/bridge.ts
: Added methods for fetching and setting bridge feature flags, source/destination tokens, and top assets.ui/ducks/bridge/actions.ts
: Introduced new Redux actions for managing bridge input fields and interacting with the background controller.ui/hooks/bridge/useBridging.ts
: Enhanced theuseBridging
hook to handle bridge experience based on network and user settings.test/e2e/tests/bridge/bridge-test-utils.ts
: Added mock server response for the portfolio bridge endpoint to ensure proper handling in e2e tests.ui/pages/bridge/index.tsx
: Introduced theCrossChainSwap
component to integrate the bridge feature into the application.
272 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
const { chainId } = network; | ||
if (!isProviderConfig(network)) { | ||
// TODO add new network and set it as active using upsertNetworkConfiguration | ||
} else if (isProviderConfig(network) && network.id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: Redundant check for isProviderConfig
353ab3b
to
85a352b
Compare
f155cae
to
d035314
Compare
85a352b
to
b6447a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This pull request introduces controller and Redux methods for managing bridge page input fields, enhancing the bridge functionality by allowing dynamic updates based on user input.
app/scripts/controllers/bridge/bridge-controller.ts
: Introduced a newBridgeController
class to manage bridge state and actions.ui/ducks/bridge/actions.ts
: Added Redux actions for setting source and destination chains.test/e2e/tests/bridge/bridge-test-utils.ts
: Updated mock server setup for bridge API endpoints.ui/pages/bridge/index.tsx
: IntegrateduseBridging
hook intoCrossChainSwap
component.app/scripts/lib/setupSentry.js
: Updated Sentry state with new bridge-related properties.
32 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
const { chainId } = network; | ||
if (!isProviderConfig(network)) { | ||
// TODO add new network and set it as active using upsertNetworkConfiguration | ||
} else if (isProviderConfig(network) && network.id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: Redundant check for isProviderConfig
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This pull request introduces controller and Redux methods for managing bridge page input fields, enhancing the bridge functionality by allowing dynamic updates based on user input.
app/scripts/controllers/bridge/bridge-controller.ts
: Added methods for selecting source and destination networks, fetching and setting top assets and tokens.ui/ducks/bridge/actions.ts
: Introduced new actions for setting source and destination chains.test/e2e/tests/bridge/bridge-test-utils.ts
: Updated mock server setup to handle new bridge API endpoints.ui/pages/bridge/index.tsx
: IntegrateduseBridging
hook intoCrossChainSwap
component.app/scripts/metamask-controller.js
: Added new bridge input actions to the MetaMask controller.
29 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
const { chainId } = network; | ||
if (!isProviderConfig(network)) { | ||
// TODO add new network and set it as active using upsertNetworkConfiguration | ||
} else if (isProviderConfig(network) && network.id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: Redundant check for isProviderConfig
.
Builds ready [b6447a1]
Page Load Metrics (84 ± 11 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This pull request introduces controller and Redux methods for managing bridge page input fields, enhancing the bridge functionality by allowing dynamic updates based on user input.
test/e2e/default-fixture.js
: UpdatedbridgeFeatureFlags
with network IDs '0x1', '0xa', and '0xe708'.test/e2e/fixture-builder.js
: AddedwithBridgeControllerDefaultState
method to initializeBridgeController
state.test/e2e/tests/bridge/bridge-test-utils.ts
: Added method to set default state forBridgeController
and a TODO for future improvements.test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json
: AddedsrcNetworkAllowlist
anddestNetworkAllowlist
properties.test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json
: UpdatedbridgeFeatureFlags
with specific network allowlists.
5 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Builds ready [e3d2cfd]
Page Load Metrics (162 ± 165 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
cfece3b
to
23d035d
Compare
65c14a6
to
7d62780
Compare
Description
This change adds controller and redux methods for managing bridge page input fields (networks, src/dest chain, token, amounts)
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/METABRIDGE-866
Manual testing steps
BRIDGE_USE_DEV_APIS=1
Screenshots/Recordings
Before
After
No visual changes
Pre-merge author checklist
Pre-merge reviewer checklist