Skip to content

feat(deposit): webview navigation improvements#17388

Merged
wachunei merged 23 commits into
mainfrom
feat/deposit/webview-improvements
Jul 21, 2025
Merged

feat(deposit): webview navigation improvements#17388
wachunei merged 23 commits into
mainfrom
feat/deposit/webview-improvements

Conversation

@AxelGes

@AxelGes AxelGes commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

Description

  • Navigation now happens faster. It starts as soon as we have the orderId instead of waiting to fetch the actual order
  • Fixed the 'double navigation' issue which also resolved the duplicated notification error

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Screen.Recording.2025-07-18.at.4.27.27.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.

@metamaskbot metamaskbot added the team-money-movement issues related to Money Movement features label Jul 18, 2025
@github-actions

Copy link
Copy Markdown
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.

@AxelGes AxelGes marked this pull request as ready for review July 18, 2025 19:18
@AxelGes AxelGes requested a review from a team as a code owner July 18, 2025 19:18
cursor[bot]

This comment was marked as outdated.

@AxelGes AxelGes added No QA Needed Apply this label when your PR does not need any QA effort. Run Smoke E2E labels Jul 18, 2025
@github-actions

github-actions Bot commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: a6112e9
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/508cbcaa-cb69-4985-bb01-4fae8909b750

Note

  • You can rerun any failed steps by opening the Bitrise build, tapping Rebuild on the upper right then Rebuild unsuccessful Workflows
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

cursor[bot]

This comment was marked as outdated.

wachunei
wachunei previously approved these changes Jul 18, 2025
@github-actions

github-actions Bot commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: d8029b2
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/68e1a5a2-24fd-4dd0-8582-fa6a6e480e44

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

cursor[bot]

This comment was marked as outdated.

- Merged analytics tracking functionality into webview improvements
- Combined Loader component with analytics tracking in OrderProcessing
- Added RAMPS_TRANSACTION_CONFIRMED and RAMPS_TRANSACTION_COMPLETED events
- Updated tests to include analytics tracking coverage
- Resolved conflicts while preserving both features
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@github-actions

github-actions Bot commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: e9fd5eb
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/128c3761-ef60-4aee-a5dc-68fd4c5466b3

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Order ID Mismatch Causes Infinite Loading

The OrderProcessing screen now displays an infinite loading spinner when an order is not found, removing the previous error state and "Back to Wallet" button. This is compounded by an order ID mismatch: the screen is navigated to with a transformed order ID, but the order is subsequently fetched and stored in Redux using the original ID. This prevents the OrderProcessing component from finding the order, leaving users stuck on a perpetual loading screen with no recovery mechanism.

app/components/UI/Ramp/Deposit/hooks/useDepositRouting.ts#L216-L267

try {
const transformedOrderId =
OrderIdTransformer.transakOrderIdToDepositOrderId(
orderId,
DEPOSIT_ENVIRONMENT,
);
navigateToOrderProcessingCallback({
orderId: transformedOrderId,
});
const order = await getOrder(orderId, selectedWalletAddress);
if (!order) {
throw new Error('Missing order');
}
const cryptoCurrency = getCryptoCurrencyFromTransakId(
order.cryptoCurrency,
);
const processedOrder = {
...depositOrderToFiatOrder(order),
account: selectedWalletAddress || order.walletAddress,
network: cryptoCurrency?.chainId || order.network,
};
await handleNewOrder(processedOrder);
trackEvent('RAMPS_TRANSACTION_CONFIRMED', {
ramp_type: 'DEPOSIT',
amount_source: Number(order.fiatAmount),
amount_destination: Number(order.cryptoAmount),
exchange_rate: Number(order.exchangeRate),
gas_fee: order.networkFees ? Number(order.networkFees) : 0,
processing_fee: order.partnerFees
? Number(order.partnerFees)
: 0,
total_fee: Number(order.totalFeesFiat),
payment_method_id: order.paymentMethod,
country: selectedRegion?.isoCode || '',
chain_id: cryptoCurrency?.chainId || '',
currency_destination:
selectedWalletAddress || order.walletAddress,
currency_source: order.fiatCurrency,
});
} catch (error) {
throw new Error(
error instanceof Error && error.message
? error.message
: 'Failed to process order from navigation',
);
}

app/components/UI/Ramp/Deposit/Views/OrderProcessing/OrderProcessing.tsx#L145-L152

if (!order) {
return (
<ScreenLayout>
<Loader size="large" color={theme.colors.primary.default} />
</ScreenLayout>
);
}

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@sonarqubecloud

Copy link
Copy Markdown

@AxelGes AxelGes added this pull request to the merge queue Jul 21, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 21, 2025
@wachunei wachunei added this pull request to the merge queue Jul 21, 2025
Merged via the queue into main with commit cbdb405 Jul 21, 2025
56 of 58 checks passed
@wachunei wachunei deleted the feat/deposit/webview-improvements branch July 21, 2025 19:47
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 21, 2025
@metamaskbot metamaskbot added the release-7.53.0 Issue or pull request that will be included in release 7.53.0 label Jul 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. release-7.53.0 Issue or pull request that will be included in release 7.53.0 team-money-movement issues related to Money Movement features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants