Skip to content

Commit 949859f

Browse files
committed
Open the ramps flow from a buy/sell deep link
Navigates to the buy or sell tab and threads the optional provider and payment type through as link-scoped pins.
1 parent 8cec51d commit 949859f

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/actions/DeepLinkingActions.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,26 @@ async function handleLink(
490490
break
491491
}
492492

493+
case 'rampCreate': {
494+
// Open the ramps buy/sell flow, optionally pinning a provider and payment
495+
// type to the top of the quote results. The pin lives in the navigation
496+
// params only: nothing is written to the account referral state, and a
497+
// pin that matches no quote degrades to the normal ordering.
498+
const { direction, providerId, paymentType } = link
499+
if (direction === 'buy') {
500+
navigation.navigate('buyTab', {
501+
screen: 'pluginListBuy',
502+
params: { providerId, paymentType }
503+
})
504+
} else {
505+
navigation.navigate('sellTab', {
506+
screen: 'pluginListSell',
507+
params: { providerId, paymentType }
508+
})
509+
}
510+
break
511+
}
512+
493513
case 'ramp': {
494514
const result = rampDeeplinkManager.handleDeeplink(link)
495515
if (!result.success) {

0 commit comments

Comments
 (0)