From 9d49ce52bf7bc4d19f13fa397d25f1a827590d3c Mon Sep 17 00:00:00 2001
From: kushagrasarathe <76868364+kushagrasarathe@users.noreply.github.com>
Date: Tue, 19 Aug 2025 22:01:44 +0530
Subject: [PATCH 1/2] fix: usa bank account claims
---
.../Claim/Link/views/BankFlowManager.view.tsx | 14 +++++++++++---
src/utils/bridge.utils.ts | 2 +-
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/components/Claim/Link/views/BankFlowManager.view.tsx b/src/components/Claim/Link/views/BankFlowManager.view.tsx
index 687f21b61..d5a3fdd19 100644
--- a/src/components/Claim/Link/views/BankFlowManager.view.tsx
+++ b/src/components/Claim/Link/views/BankFlowManager.view.tsx
@@ -113,7 +113,9 @@ export const BankFlowManager = (props: IClaimScreenProps) => {
* @name handleCreateOfframpAndClaim
* @description creates an off-ramp transfer for the user, either as a guest or a logged-in user.
*/
- const handleCreateOfframpAndClaim = async (account: IBankAccountDetails) => {
+ const handleCreateOfframpAndClaim = async (
+ account: IBankAccountDetails & { id?: string; bridgeAccountId?: string }
+ ) => {
try {
setLoadingState('Executing transaction')
setError(null)
@@ -148,6 +150,12 @@ export const BankFlowManager = (props: IClaimScreenProps) => {
const contractVersion = params.contractVersion
const peanutContractAddress = peanut.getContractAddress(chainId, contractVersion) as Address
+ const externalAccountId = account?.bridgeAccountId ?? account?.id
+
+ if (!externalAccountId) throw new Error('External account ID not found')
+
+ const destination = getOfframpCurrencyConfig(account.country ?? selectedCountry!.id)
+
// handle offramp request creation
const offrampRequestParams: TCreateOfframpRequest = {
onBehalfOf: userForOfframp.bridgeCustomerId,
@@ -160,8 +168,8 @@ export const BankFlowManager = (props: IClaimScreenProps) => {
fromAddress: peanutContractAddress,
},
destination: {
- ...getOfframpCurrencyConfig(account.country ?? selectedCountry!.id),
- externalAccountId: (account as any).bridgeAccountId ?? (account as any).id,
+ ...destination,
+ externalAccountId,
},
features: { allowAnyFromAddress: true },
}
diff --git a/src/utils/bridge.utils.ts b/src/utils/bridge.utils.ts
index 0dc594247..cb497dca5 100644
--- a/src/utils/bridge.utils.ts
+++ b/src/utils/bridge.utils.ts
@@ -11,7 +11,7 @@ export type BridgeOperationType = 'onramp' | 'offramp'
* Payment rails differ between onramp and offramp operations
*/
export const getCurrencyConfig = (countryId: string, operationType: BridgeOperationType): CurrencyConfig => {
- if (countryId === 'US') {
+ if (countryId === 'US' || countryId === 'USA') {
return {
currency: 'usd',
paymentRail: operationType === 'onramp' ? 'ach_push' : 'ach',
From 12c652176f71d848016ca8a8e79c98386aff7633 Mon Sep 17 00:00:00 2001
From: kushagrasarathe <76868364+kushagrasarathe@users.noreply.github.com>
Date: Tue, 19 Aug 2025 22:11:00 +0530
Subject: [PATCH 2/2] fix: show bank account details in confirm claim view
---
.../Claim/Link/views/Confirm.bank-claim.view.tsx | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/components/Claim/Link/views/Confirm.bank-claim.view.tsx b/src/components/Claim/Link/views/Confirm.bank-claim.view.tsx
index 125191d5c..b5112210d 100644
--- a/src/components/Claim/Link/views/Confirm.bank-claim.view.tsx
+++ b/src/components/Claim/Link/views/Confirm.bank-claim.view.tsx
@@ -73,6 +73,13 @@ export function ConfirmBankClaimView({
{bankDetails.iban && }
{bankDetails.bic && }
+ {bankDetails.clabe && }
+ {bankDetails.accountNumber && (
+
+ )}
+ {bankDetails.routingNumber && (
+
+ )}