fix: claim country currency and amount, fallback to $ #1164
fix: claim country currency and amount, fallback to $ #1164kushagrasarathe merged 4 commits intopeanut-wallet-devfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAllows guests to claim without waiting for user fetch, adds currency-aware amount rendering and loading state to bank-claim confirmation (with new PeanutActionDetailsCard isLoading/currencySymbol props and useCurrency isLoading), tightens token/network visibility for certain SEND_LINK history entries, guarantees isSubmitting reset in bank form, resets claim flow on login transition, and moves post-login redirect handling to a useEffect. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Suggested labels
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
src/components/TransactionDetails/TransactionDetailsReceipt.tsx (1)
197-223: Coingecko fetch: add ok-check, abort, and safer fallbacksDirect client fetch to a public API without
response.okchecks/abort may fail silently or race on re-renders. AlsochainNamemay not match Coingecko platform ids. Prefer existing metadata sources if available; otherwise harden this fetch.Example hardening:
useEffect(() => { const getTokenDetails = async () => { if (!transaction) { setIsTokenDataLoading(false) return } if (transaction.tokenDisplayDetails?.tokenIconUrl && transaction.tokenDisplayDetails.tokenSymbol) { setTokenData({ symbol: transaction.tokenDisplayDetails.tokenSymbol, icon: transaction.tokenDisplayDetails.tokenIconUrl, }) setIsTokenDataLoading(false) return } - try { - const res = await fetch( - `https://api.coingecko.com/api/v3/coins/${transaction.tokenDisplayDetails?.chainName}/contract/${transaction.tokenAddress}` - ) - const tokenDetails = await res.json() - setTokenData({ - symbol: tokenDetails.symbol, - icon: tokenDetails.image.large, - }) - } catch (e) { + const controller = new AbortController() + try { + const chainId = transaction.tokenDisplayDetails?.coingeckoPlatformId ?? transaction.tokenDisplayDetails?.chainName + const url = `https://api.coingecko.com/api/v3/coins/${chainId}/contract/${transaction.tokenAddress}` + const res = await fetch(url, { signal: controller.signal }) + if (!res.ok) throw new Error(`Coingecko ${res.status}`) + const tokenDetails = await res.json() + setTokenData({ + symbol: tokenDetails?.symbol?.toUpperCase?.() || transaction.tokenDisplayDetails?.tokenSymbol || '', + icon: tokenDetails?.image?.large || transaction.tokenDisplayDetails?.tokenIconUrl || '', + }) + } catch (e) { console.error(e) setTokenData({ symbol: '', icon: '', }) } finally { setIsTokenDataLoading(false) } } getTokenDetails() -}, []) + return () => controller.abort() +}, [])If we already have an internal token metadata provider, consider using that instead of Coingecko from the client.
src/components/Claim/Claim.tsx (1)
112-121: ComputeoriginalUserRolebased on current viewer
RefactororiginalUserRoleto use the authenticated user’s ID instead of hard-codingSENDERand includeuserin the memo dependencies:src/components/Claim/Claim.tsx extraDataForDrawer: { isLinkTransaction: true, originalType: EHistoryEntryType.SEND_LINK, - originalUserRole: EHistoryUserRole.SENDER, + originalUserRole: + user?.user.userId === claimLinkData.sender?.userId + ? EHistoryUserRole.SENDER + : EHistoryUserRole.RECIPIENT, link: claimLinkData.link, rewardData, }, ... - }, [claimLinkData, interactions]) + }, [claimLinkData, interactions, user])src/hooks/useCurrency.ts (1)
11-16: Bug: hook doesn’t react tocurrencyCodeprop changes
codeis initialized fromcurrencyCodebut never updated when the input changes. Add a syncing effect.Apply:
export const useCurrency = (currencyCode: string | null) => { const [code, setCode] = useState<string | null>(currencyCode?.toUpperCase() ?? null) const [symbol, setSymbol] = useState<string | null>(null) const [price, setPrice] = useState<number | null>(null) const [isLoading, setIsLoading] = useState<boolean>(false) + + useEffect(() => { + setCode(currencyCode?.toUpperCase() ?? null) + }, [currencyCode])
🧹 Nitpick comments (7)
src/components/TransactionDetails/TransactionDetailsReceipt.tsx (3)
103-103: Typo in comment"acitvity" → "activity".
Apply:
- // hide token and network for send links in acitvity drawer for sender + // hide token and network for send links in activity drawer for sender
262-434: Show currency symbol for Fee value"Fee" currently renders a bare number (e.g.,
1.23). For consistency with other amounts, prefix with$.Apply:
- const feeDisplay = transaction.fee !== undefined ? formatAmount(transaction.fee as number) : 'N/A' + const feeDisplay = transaction.fee !== undefined ? `$ ${formatAmount(transaction.fee as number)}` : 'N/A'
1007-1036: Null-asserteduserin cancel modal
sendLinksApi.claim(user!.user.username!, ...)assumesuseris always defined. While the button is gated for senders, a defensive check avoids runtime crashes if state desynchronizes.Example:
- sendLinksApi - .claim(user!.user.username!, transaction.extraDataForDrawer!.link!) + if (!user?.user?.username || !transaction.extraDataForDrawer?.link) { + setIsLoading(false) + return + } + sendLinksApi.claim(user.user.username, transaction.extraDataForDrawer.link)src/hooks/useCurrency.ts (2)
4-9: Typo: rename SIMBOLS to SYMBOLSMinor readability fix.
Apply:
-const SIMBOLS_BY_CURRENCY_CODE: Record<string, string> = { +const SYMBOLS_BY_CURRENCY_CODE: Record<string, string> = {And replace usages accordingly.
17-47: Avoid stale updates and add ok early-returnsGuard async updates against race conditions when
codechanges or component unmounts.Apply:
- useEffect(() => { + useEffect(() => { + let active = true if (!code) { setIsLoading(false) return } @@ - setIsLoading(true) - getCurrencyPrice(code) - .then((price) => { - setSymbol(SIMBOLS_BY_CURRENCY_CODE[code]) - setPrice(price) - setIsLoading(false) - }) - .catch((err) => { - console.error(err) - setIsLoading(false) - }) - }, [code]) + setIsLoading(true) + const currentCode = code + getCurrencyPrice(currentCode) + .then((p) => { + if (!active || currentCode !== code) return + setSymbol(SYMBOLS_BY_CURRENCY_CODE[currentCode]) + setPrice(p) + setIsLoading(false) + }) + .catch((err) => { + if (!active) return + console.error(err) + setIsLoading(false) + }) + return () => { + active = false + } + }, [code])src/components/Global/PeanutActionDetailsCard/index.tsx (1)
205-226: Withdraw display vs. historical learning: confirm specCurrent logic prefixes
$for USDC withdrawals and omits the trailing token label. Prior guidance for withdraw flows suggested explicitly showing “USDC” as the token symbol. Please confirm the desired UX and adjust either the prefix or trailing unit accordingly for withdraw views.src/components/Claim/Link/views/Confirm.bank-claim.view.tsx (1)
70-86: Converted amount formattingFor non-USD, render with the shared formatter for locale-consistent decimals and grouping.
Apply:
- const displayAmount = useMemo(() => { + const displayAmount = useMemo(() => { if (currencyCode === 'USD') return usdAmount if (isLoadingCurrency) return '-' if (!price || isNaN(price)) return usdAmount - const converted = (Number(usdAmount) * price).toFixed(2) - return converted + const converted = Number(usdAmount.replace(/,/g, '')) * price + return formatAmount(converted) }, [price, usdAmount, currencyCode, isLoadingCurrency])
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (5)
src/components/Claim/Claim.tsx(1 hunks)src/components/Claim/Link/views/Confirm.bank-claim.view.tsx(3 hunks)src/components/Global/PeanutActionDetailsCard/index.tsx(4 hunks)src/components/TransactionDetails/TransactionDetailsReceipt.tsx(1 hunks)src/hooks/useCurrency.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#919
File: src/components/Withdraw/views/Initial.withdraw.view.tsx:87-87
Timestamp: 2025-06-18T19:56:55.443Z
Learning: In withdraw flows for Peanut Wallet, the PeanutActionDetailsCard should always display "USDC" as the token symbol because it shows the amount being withdrawn from the Peanut Wallet (which holds USDC), regardless of the destination token/chain selected by the user. The TokenSelector is used for choosing the withdrawal destination, not the source display.
📚 Learning: 2024-11-18T21:36:11.486Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#535
File: src/components/Claim/Claim.tsx:142-146
Timestamp: 2024-11-18T21:36:11.486Z
Learning: In `src/components/Claim/Claim.tsx`, external calls like token price fetching and cross-chain details retrieval are already encapsulated within existing `try...catch` blocks, so additional error handling may be unnecessary.
Applied to files:
src/components/Claim/Claim.tsx
📚 Learning: 2025-06-18T19:56:55.443Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#919
File: src/components/Withdraw/views/Initial.withdraw.view.tsx:87-87
Timestamp: 2025-06-18T19:56:55.443Z
Learning: In withdraw flows for Peanut Wallet, the PeanutActionDetailsCard should always display "USDC" as the token symbol because it shows the amount being withdrawn from the Peanut Wallet (which holds USDC), regardless of the destination token/chain selected by the user. The TokenSelector is used for choosing the withdrawal destination, not the source display.
Applied to files:
src/components/Global/PeanutActionDetailsCard/index.tsx
🧬 Code graph analysis (3)
src/hooks/useCurrency.ts (1)
src/app/actions/currency.ts (1)
getCurrencyPrice(7-50)
src/components/Global/PeanutActionDetailsCard/index.tsx (2)
src/app/[...recipient]/loading.tsx (1)
Loading(3-5)src/constants/zerodev.consts.ts (1)
PEANUT_WALLET_TOKEN_SYMBOL(21-21)
src/components/Claim/Link/views/Confirm.bank-claim.view.tsx (2)
src/hooks/useCurrency.ts (1)
useCurrency(11-55)src/utils/bridge.utils.ts (1)
getCurrencySymbol(45-52)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Deploy-Preview
🔇 Additional comments (6)
src/components/TransactionDetails/TransactionDetailsReceipt.tsx (1)
100-108: Sender-only hide: verify role semanticsHiding the "Token and network" row only for SEND_LINK senders in history makes sense. However, this depends on
extraDataForDrawer.originalUserRolereflecting the current viewer’s role, not the original actor. In Claim flow, we currently set this to SENDER unconditionally (see Claim.tsx lines 112-121), which could incorrectly hide the row for recipients. Please confirm and align the role source so the condition maps to the viewer context.src/components/Claim/Claim.tsx (2)
216-224: Guest-fast path looks goodAllowing claim progression when no user is present meets the PR goal. The subsequent re-check after fetch will refine sender/recipient state. LGTM.
309-316: Drawer refresh cycle
onClose={() => checkLink(window.location.href)}re-fetches and may immediately reopen the drawer (depending onlinkState). Confirm this won’t cause flicker or loops after cancel/claim actions.src/components/Global/PeanutActionDetailsCard/index.tsx (1)
200-228: Header loading state: good UX improvementGating the amount render behind
isLoadingwith a lightweight loader is clean and avoids layout shifts.src/components/Claim/Link/views/Confirm.bank-claim.view.tsx (2)
71-72: Hook responsiveness to account changesIf bank details change (e.g., IBAN ↔ CLABE),
currencyCodechanges. EnsureuseCurrencyupdates accordingly (requires the fix suggested in useCurrency.ts).
100-110: Card props wiring looks correctPassing
countryCodeForFlag,currencySymbol, andisLoadingaligns with the new card API; amount will show once the rate resolves. LGTM.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
src/components/AddWithdraw/DynamicBankAccountForm.tsx (5)
98-101: Fix TDZ bug: don’t evaluate handleSubmit(onSubmit) before onSubmit is definedThis creates a ReferenceError during render. Defer the call so onSubmit is read at invocation time.
Apply:
- useImperativeHandle(ref, () => ({ - handleSubmit: handleSubmit(onSubmit), - })) + useImperativeHandle(ref, () => ({ + handleSubmit: () => handleSubmit(onSubmit)(), + }))
71-72: Guard against undefined selectedCountrytoLowerCase() will throw if both countryNameFromProps and route param are absent.
- let selectedCountry = (countryNameFromProps ?? (countryNameParams as string)).toLowerCase() + const selectedCountry = (countryNameFromProps ?? (countryNameParams as string) ?? country).toLowerCase()
229-239: Sanitize inputs consistently; comment currently mismatches behaviorTrim only removes edges; CLABE/IBAN/BIC/routing/account numbers often include inner spaces.
- onBlur={async (e) => { - // remove any whitespace from the input field - // note: @dev not a great fix, this should also be fixed in the backend - if (typeof field.value === 'string') { - field.onChange(field.value.trim()) - } + onBlur={async () => { + // normalize input: strip all whitespace for identifier fields; otherwise trim + if (typeof field.value === 'string') { + const needsStrictSanitization = + ['accountNumber', 'clabe', 'routingNumber', 'iban', 'bic'].includes(name as string) + const sanitized = needsStrictSanitization + ? field.value.replace(/\s+/g, '') + : field.value.trim() + field.onChange(sanitized) + } field.onBlur() if (onBlur) { await onBlur(field) } }}
141-149: IBAN → BIC: sanitize IBAN and normalize BIC to uppercaseAvoid lookup failures from spaces and store a canonical BIC.
- const autoBic = await getBicFromIban(accountNumber) - if (autoBic) { - bic = autoBic - // set the BIC value in the form without showing the field - setValue('bic', autoBic, { shouldValidate: false }) + const autoBic = await getBicFromIban(accountNumber.replace(/\s/g, '')) + if (autoBic) { + const normalizedBic = autoBic.trim().toUpperCase() + bic = normalizedBic + // set the BIC value in the form without showing the field + setValue('bic', normalizedBic, { shouldValidate: false })
181-183: Strip whitespace from routing numbers before sendingPrevents backend rejects when users paste spaced numbers.
- if (isUs && data.routingNumber) { - payload.routingNumber = data.routingNumber - } + if (isUs && data.routingNumber) { + payload.routingNumber = data.routingNumber.replace(/\s/g, '') + }
🧹 Nitpick comments (6)
src/components/Claim/Link/Initial.view.tsx (2)
113-121: Login-transition reset: good; tiny dependency nitThe prevUser-based guard cleanly scopes the reset to first login. If
resetClaimBankFlowis a stable ref from context (likely), you can omit it from deps to avoid effect churn.
784-785: Align modal gating with user checks used elsewhereElsewhere in this file you gate on
!!user?.user.userId. Here you check!user. To avoid inconsistent states during auth hydration, align the condition.Apply:
- isOpen={showVerificationModal && !user} + isOpen={showVerificationModal && !user?.user?.userId}src/components/AddWithdraw/DynamicBankAccountForm.tsx (4)
128-131: Normalize user-entered BIC before useUppercase and trim to avoid validation issues.
const { firstName, lastName } = data let bic = data.bic || getValues('bic') const iban = data.iban || getValues('iban') + if (typeof bic === 'string') { + bic = bic.trim().toUpperCase() + }
198-201: Handle unknown errors safely; avoid any in catchProvides a user-friendly fallback message.
- } catch (error: any) { - setSubmissionError(error.message) + } catch (err: unknown) { + const message = + err instanceof Error ? err.message : 'Something went wrong while adding your bank. Please try again.' + setSubmissionError(message)
103-107: Remove console.log in production pathKeep noise out of prod logs; use debug and guard by env if needed.
- if (isValidating) { - console.log('Validation still checking, skipping submission') - return - } + if (isValidating) { + if (process.env.NODE_ENV !== 'production') { + console.debug('Validation still checking, skipping submission') + } + return + }
205-208: DRY compute isUs/isMx/isIban onceMinor cleanup: derive once with useMemo and reuse in onSubmit and render.
Example:
const isUs = useMemo(() => country.toUpperCase() === 'USA', [country]) const isMx = useMemo(() => country.toUpperCase() === 'MX', [country]) const isIban = useMemo(() => !(isUs || isMx) && isIBANCountry(country), [country, isUs, isMx])Also applies to: 116-124
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
src/components/AddWithdraw/DynamicBankAccountForm.tsx(2 hunks)src/components/Claim/Link/Initial.view.tsx(2 hunks)src/components/Setup/Views/Welcome.tsx(2 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#535
File: src/components/Claim/Claim.tsx:142-146
Timestamp: 2024-11-18T21:36:11.486Z
Learning: In `src/components/Claim/Claim.tsx`, external calls like token price fetching and cross-chain details retrieval are already encapsulated within existing `try...catch` blocks, so additional error handling may be unnecessary.
📚 Learning: 2024-10-25T11:33:46.776Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#484
File: src/components/Cashout/Components/Initial.view.tsx:273-274
Timestamp: 2024-10-25T11:33:46.776Z
Learning: In the `InitialCashoutView` component (`src/components/Cashout/Components/Initial.view.tsx`), linked bank accounts should not generate error states, and the `ValidatedInput` component will clear any error messages if needed. Therefore, it's unnecessary to manually clear the error state when selecting or clearing linked bank accounts.
Applied to files:
src/components/Claim/Link/Initial.view.tsxsrc/components/AddWithdraw/DynamicBankAccountForm.tsx
📚 Learning: 2025-01-16T13:14:40.363Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#631
File: src/components/Create/Create.tsx:108-112
Timestamp: 2025-01-16T13:14:40.363Z
Learning: In the Peanut UI codebase, the `resetTokenContextProvider` function from `tokenSelectorContext` is a stable function reference that doesn't change, so it doesn't need to be included in useEffect dependencies.
Applied to files:
src/components/Claim/Link/Initial.view.tsx
📚 Learning: 2024-12-02T17:19:18.532Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#551
File: src/components/Request/Create/Views/Initial.view.tsx:151-156
Timestamp: 2024-12-02T17:19:18.532Z
Learning: In the `InitialView` component at `src/components/Request/Create/Views/Initial.view.tsx`, when setting the default chain and token in the `useEffect` triggered by `isPeanutWallet`, it's acceptable to omit the setters from the dependency array and not include additional error handling for invalid defaults.
Applied to files:
src/components/Claim/Link/Initial.view.tsx
📚 Learning: 2025-08-22T07:28:32.281Z
Learnt from: Zishan-7
PR: peanutprotocol/peanut-ui#1104
File: src/components/Payment/PaymentForm/index.tsx:522-545
Timestamp: 2025-08-22T07:28:32.281Z
Learning: In `src/components/Payment/PaymentForm/index.tsx`, the `handleCompleteDaimoPayment` function is only for updating payment status in the backend after a successful Daimo payment. Payment success/failure is handled by Daimo itself, so try/catch error handling and error display are not needed for backend sync failures - users shouldn't see errors if payment succeeded but database update failed.
Applied to files:
src/components/AddWithdraw/DynamicBankAccountForm.tsx
🧬 Code graph analysis (1)
src/components/Setup/Views/Welcome.tsx (1)
src/utils/general.utils.ts (1)
getFromLocalStorage(126-148)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Deploy-Preview
🔇 Additional comments (2)
src/components/Setup/Views/Welcome.tsx (1)
56-58: LGTM: redirect moved out of onClickButton now strictly handles login; navigation is centralized in the effect. Cleaner separation of concerns.
src/components/AddWithdraw/DynamicBankAccountForm.tsx (1)
164-176: Confirm backend expects 'USA' vs 'US' and lowercase countryNameBoth countryCode and countryName formats vary by API; mismatches can 4xx.
Please confirm the Users service schema:
- countryCode: expected values for United States and Mexico? ('USA'/'US', 'MEX'/'MX')
- countryName: expects full name/title case vs lowercase slug (you send selectedCountry, lowercased).
If needed, I can patch to map to the required schema.
* feat: handle send link claims to bank account for peanut users (#1078) * reafactor: create reusable country list component and use it for all the flows * feat: reusable user accounts components * feat: handle different cases based on kyc status for bank claim * fix: account creation * chore: add docstring to hooks * chore: better comments for bank flow manager * fix: kyc modal closing after tos acceptance issue * fix: remove bank acc caching from withdraw flow * fix: update confirm claim modal copy * fix: remove bank acc caching from claim flow * fix: navheader title * remove duplicate debounce code and use `useDebounce` hook instead (#1079) * Landing page v2.1 (#1089) * lpv2.1 part 1 * Add exchange widget * add and integrate exchange API * add yourMoney component bg * update landing countries svg * integrate frankfurter API * fixes and improvements * decrease hero section height * allow max 2 decimal places * Add `/exchange` route * fix: overlay * make destination amount editable and bugg fixes * some fixes & currency improvements * crucial commit * fix checkmark, font size and weight --------- Co-authored-by: Hugo Montenegro <[email protected]> * [TASK-13186] refactor: use networkName instead of axelarChainName (#1095) * refactor: use networkName instead of axelarChainName * fix: types * fix: onramp currency (#1096) * fix: stretched favicon (#1099) * [TASK-13971] fix: scientific notation in eip681 parsing (#1097) * fix: scientific notation in eip681 parsing * fix: qr handling tests * fix: peanut sdk mock * pull iban hotfix (#1100) * fix: claim flow bugs (#1102) * fix: cross chain claim * fix: full name issue on confirm bank claim view * fix: back navigation on desktop views * Fix back button not working on /profile (#1101) * Fix back button not working * fix public profile page * extract internal navigation logic to utility function * fix: send link claims to us bank accounts (#1108) * fix: usa bank account claims * fix: show bank account details in confirm claim view * Sync Landing page changes (#1111) * reduce clouds size and update font * fix: hero section responsiveness issue * fix: formatting errors * add currency animation * fix: us bank claims after kyc for logged in users (#1112) * fix: trim account form inputs for spaces (#1114) * [TASK-14107] fix: don't allow claiming on xChain if route is not found (#1115) * fix: don't allow claiming on xChain if route is not found * fix(claim): use correct decimals for min receive amount * feat: handle redirect uri when on unsupported browsers (#1117) * feat: handle redirect uri when on unsupported browsers * fix: confirm bank claim ui rows for iban guest claim * remove animation (#1118) * Prod to staging (#1124) * HOTFIX - IBAN country detection and incorrect bank acc details (#1094) * Fix: Iban country detection and incorrect bank acc details * Fix: update IBAN country validation to use correct locale string comparison * add validations for US and mexican bank accounts * fix typo * fix claim flow and create a reusable function for getting 3 letter code * fix country code mismatch * fix: show error below input field * remove unnecessary checks * remove unnecessary CLABE check * Prod LP v2.1 (#1098) * feat: lpv2.1 * fix: gigaclouds, font and exchange widget * fixes and improvements * remove duplicate export * remove unused component * Fix: Landing page hero section responsiveness issue (#1107) * fix: hero section responsiveness issue * fix: stars position * fix height on desktop * remove unused code * fix margins (#1113) * [TASK-14052] Prod release 105 (#1122) * feat: handle send link claims to bank account for peanut users (#1078) * reafactor: create reusable country list component and use it for all the flows * feat: reusable user accounts components * feat: handle different cases based on kyc status for bank claim * fix: account creation * chore: add docstring to hooks * chore: better comments for bank flow manager * fix: kyc modal closing after tos acceptance issue * fix: remove bank acc caching from withdraw flow * fix: update confirm claim modal copy * fix: remove bank acc caching from claim flow * fix: navheader title * remove duplicate debounce code and use `useDebounce` hook instead (#1079) * Landing page v2.1 (#1089) * lpv2.1 part 1 * Add exchange widget * add and integrate exchange API * add yourMoney component bg * update landing countries svg * integrate frankfurter API * fixes and improvements * decrease hero section height * allow max 2 decimal places * Add `/exchange` route * fix: overlay * make destination amount editable and bugg fixes * some fixes & currency improvements * crucial commit * fix checkmark, font size and weight --------- Co-authored-by: Hugo Montenegro <[email protected]> * [TASK-13186] refactor: use networkName instead of axelarChainName (#1095) * refactor: use networkName instead of axelarChainName * fix: types * fix: onramp currency (#1096) * fix: stretched favicon (#1099) * [TASK-13971] fix: scientific notation in eip681 parsing (#1097) * fix: scientific notation in eip681 parsing * fix: qr handling tests * fix: peanut sdk mock * pull iban hotfix (#1100) * fix: claim flow bugs (#1102) * fix: cross chain claim * fix: full name issue on confirm bank claim view * fix: back navigation on desktop views * Fix back button not working on /profile (#1101) * Fix back button not working * fix public profile page * extract internal navigation logic to utility function * fix: send link claims to us bank accounts (#1108) * fix: usa bank account claims * fix: show bank account details in confirm claim view * Sync Landing page changes (#1111) * reduce clouds size and update font * fix: hero section responsiveness issue * fix: formatting errors * add currency animation * fix: us bank claims after kyc for logged in users (#1112) * fix: trim account form inputs for spaces (#1114) * [TASK-14107] fix: don't allow claiming on xChain if route is not found (#1115) * fix: don't allow claiming on xChain if route is not found * fix(claim): use correct decimals for min receive amount * feat: handle redirect uri when on unsupported browsers (#1117) * feat: handle redirect uri when on unsupported browsers * fix: confirm bank claim ui rows for iban guest claim * remove animation (#1118) * fix: formatting --------- Co-authored-by: Kushagra Sarathe <[email protected]> Co-authored-by: Mohd Zishan <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]> --------- Co-authored-by: Mohd Zishan <[email protected]> Co-authored-by: Kushagra Sarathe <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]> * fix: dates in receipts (#1105) * [TASK-13865] fix: add tx info on receipt (#1109) * fix: add tx info on receipt * feat: use address explorer url for depositor address * fix(history): check befroe creating address explorer url * Fix: logged in users have to re-login after installing PWA (#1103) * store `LOCAL_STORAGE_WEB_AUTHN_KEY` in cookies * ensure backward compatibility * refactor: move syncLocalStorageToCookie call into useEffect for better lifecycle management * feat: links v2.1 req fulfilment flows (#1085) * reafactor: create reusable country list component and use it for all the flows * feat: reusable user accounts components * feat: handle different cases based on kyc status for bank claim * fix: account creation * chore: add docstring to hooks * chore: better comments for bank flow manager * fix: kyc modal closing after tos acceptance issue * fix: remove bank acc caching from withdraw flow * fix: update confirm claim modal copy * fix: remove bank acc caching from claim flow * fix: navheader title * feat: req fulfillment exchange flow * fix: header title * feat: req fulfillment using connected external wallet * fix: navigation and ui * fix: file name * feat: abstract reusbale components from onramp flow for bank fulfilment * feat: handle onramp creation for request fulfilment * feat: reusable verification component * feat: handle bank req fulfilment for peanut users * fix: show all supported countries in req/claim bank flow * feat: show google-pay/apple-pay based on users device * fix: resolve pr review comments * fix: exhange rate hook fallback value * fix: resolve pr comments * Feat: Collect tg username (#1110) * feat: collect tg username * update animations * fix api route * add thinking peanut gif * fix typescript errors * fix typo and reset telegramHandle field on logout * fix: spacing and describe regex rules * add missing export * feat: add sound in success views (#1127) * feat: handle history ui changes for links v2.1 (#1106) * reafactor: create reusable country list component and use it for all the flows * feat: reusable user accounts components * feat: handle different cases based on kyc status for bank claim * fix: account creation * chore: add docstring to hooks * chore: better comments for bank flow manager * fix: kyc modal closing after tos acceptance issue * fix: remove bank acc caching from withdraw flow * fix: update confirm claim modal copy * fix: remove bank acc caching from claim flow * fix: navheader title * feat: req fulfillment exchange flow * fix: header title * feat: req fulfillment using connected external wallet * fix: navigation and ui * fix: file name * feat: abstract reusbale components from onramp flow for bank fulfilment * feat: handle onramp creation for request fulfilment * feat: reusable verification component * feat: handle bank req fulfilment for peanut users * fix: show all supported countries in req/claim bank flow * feat: show google-pay/apple-pay based on users device * feat: handle bank send link claim hisotry for peanut users * feat: handle history ui changes for request fulfillment using bank accounts * fix: resolve pr review comments * fix: exhange rate hook fallback value * fix: resolve pr comments * fix: review comments * feat: badges updates (#1119) * feat: badges updates and hook to check for interactions * feat: handle badges for receipts and drawer header * feat: handle badges on request and send flow * feat: tooltip for badges * fix: tooltip positioning * fix: associate a external wallet claim to user if logged in (#1126) * fix: associate a external wallet claim to user if logged in * chore: fix comments * [TASK-14113] fix: handle rpc outage when creating sendlinks (#1120) * HOTFIX - IBAN country detection and incorrect bank acc details (#1094) * Fix: Iban country detection and incorrect bank acc details * Fix: update IBAN country validation to use correct locale string comparison * add validations for US and mexican bank accounts * fix typo * fix claim flow and create a reusable function for getting 3 letter code * fix country code mismatch * fix: show error below input field * remove unnecessary checks * remove unnecessary CLABE check * Prod LP v2.1 (#1098) * feat: lpv2.1 * fix: gigaclouds, font and exchange widget * fixes and improvements * remove duplicate export * remove unused component * Fix: Landing page hero section responsiveness issue (#1107) * fix: hero section responsiveness issue * fix: stars position * fix height on desktop * remove unused code * fix margins (#1113) * fix: handle rpc outage when creating sendlinks * fix: formatting * fix: parallelize geting deposit index --------- Co-authored-by: Mohd Zishan <[email protected]> * Integrate Daimo Pay (#1104) * add daimo pay * minor improvements * cleanup and add success state * resolve dependency issues * fix: formatting * fix: recent methods redirection * add functions for daimo payment in request fulfilment flow * Integrate daimo in request fulfilment flow * remove hardcoded address * add separate arbitrum usdc flow for deposits * Add risk modal * fix overlay blur * Enhance loading state indication in payment process * Add payer's address in deposit history entry * Add validation * add error handling * remove action and move logic to API route * fix errors * fix: request flow * fix: validation * fixes * add daimo flow in country specific method * fix: slider not working on first attempt * filter supported networks * create reusable daimo button * remove space * remove route.ts file and move logic to server actions * fix: infinite loading edge case * update api and remove delay * fix: layout shift * fix: shadow * update function name * fix: success receipt (#1129) * fix: roboto font not working (#1130) * fix: allow cancel link from the claim page * fix: allow canceling links from the shared receipt (#1134) * fix: send flow cta (#1133) * fix: send flow ctas * fix: success sound on send flow * fix: disabled btn on req pay flow * Fix Daimo bugs (#1132) * fix: bugs * fix cross chain deposit details not correct * fix: request screen UI * add loading state * remove old daimo button * fix: missing dependencies and dead code * add try catch finally block * remove clear Daimo errors inside the balance-check effect * fix copy * minor fixes * move ACTION_METHODS to constants file to remove circular dependency * fix: circular dependency * fix ts error * update daimo version * [TASK-14095] feat: add fallback transport to viem clients (#1131) * feat: add fallback transport to viem clients Use viem fallback transport to handle RPC errors and fallback to other providers. * style: Apply prettier formatting * test: add fallback to viem mock * fix: external claim links history ui + badges fix (#1136) * fix: external claim links history ui + badges fix * fix: resolve codderrabbit suggestions * fix: coderrabbit comment on state stale * Fix: disable add money button on default state + disable sound on IOS (#1145) * fix: add money success screen shows usernmae * disable add money button in default state * disable sound on IOS * Fix: daimo bugs part2 (#1149) * fix: black screen on IOS * fix: sucess screen showed without paying - add money flow * fix currency and double $ in txn history * fix: x-chan token size and add API to get missing token icons * fix: req fulfilment * add default value to tokenData * fix: move useeffect above transaction null check * format amount * fix: space between currency and amount (#1135) * Lock token to USDC arb for peanut ens username (#1128) * Lock token to USDC arb for peanut ens username * add comment * revert variable declaration for sanitizedValue in GeneralRecipientInput component * fix add regex to strip only from the end * [TASK-13900] Feat/kyc modal changes (#1137) * fix: pointer events * fix: modal btns not working on mobile * add missing dependency * remove close button * Chore/prod to dev 106 (#1152) * HOTFIX - IBAN country detection and incorrect bank acc details (#1094) * Fix: Iban country detection and incorrect bank acc details * Fix: update IBAN country validation to use correct locale string comparison * add validations for US and mexican bank accounts * fix typo * fix claim flow and create a reusable function for getting 3 letter code * fix country code mismatch * fix: show error below input field * remove unnecessary checks * remove unnecessary CLABE check * Prod LP v2.1 (#1098) * feat: lpv2.1 * fix: gigaclouds, font and exchange widget * fixes and improvements * remove duplicate export * remove unused component * Fix: Landing page hero section responsiveness issue (#1107) * fix: hero section responsiveness issue * fix: stars position * fix height on desktop * remove unused code * fix margins (#1113) * [TASK-14052] Prod release 105 (#1122) * feat: handle send link claims to bank account for peanut users (#1078) * reafactor: create reusable country list component and use it for all the flows * feat: reusable user accounts components * feat: handle different cases based on kyc status for bank claim * fix: account creation * chore: add docstring to hooks * chore: better comments for bank flow manager * fix: kyc modal closing after tos acceptance issue * fix: remove bank acc caching from withdraw flow * fix: update confirm claim modal copy * fix: remove bank acc caching from claim flow * fix: navheader title * remove duplicate debounce code and use `useDebounce` hook instead (#1079) * Landing page v2.1 (#1089) * lpv2.1 part 1 * Add exchange widget * add and integrate exchange API * add yourMoney component bg * update landing countries svg * integrate frankfurter API * fixes and improvements * decrease hero section height * allow max 2 decimal places * Add `/exchange` route * fix: overlay * make destination amount editable and bugg fixes * some fixes & currency improvements * crucial commit * fix checkmark, font size and weight --------- Co-authored-by: Hugo Montenegro <[email protected]> * [TASK-13186] refactor: use networkName instead of axelarChainName (#1095) * refactor: use networkName instead of axelarChainName * fix: types * fix: onramp currency (#1096) * fix: stretched favicon (#1099) * [TASK-13971] fix: scientific notation in eip681 parsing (#1097) * fix: scientific notation in eip681 parsing * fix: qr handling tests * fix: peanut sdk mock * pull iban hotfix (#1100) * fix: claim flow bugs (#1102) * fix: cross chain claim * fix: full name issue on confirm bank claim view * fix: back navigation on desktop views * Fix back button not working on /profile (#1101) * Fix back button not working * fix public profile page * extract internal navigation logic to utility function * fix: send link claims to us bank accounts (#1108) * fix: usa bank account claims * fix: show bank account details in confirm claim view * Sync Landing page changes (#1111) * reduce clouds size and update font * fix: hero section responsiveness issue * fix: formatting errors * add currency animation * fix: us bank claims after kyc for logged in users (#1112) * fix: trim account form inputs for spaces (#1114) * [TASK-14107] fix: don't allow claiming on xChain if route is not found (#1115) * fix: don't allow claiming on xChain if route is not found * fix(claim): use correct decimals for min receive amount * feat: handle redirect uri when on unsupported browsers (#1117) * feat: handle redirect uri when on unsupported browsers * fix: confirm bank claim ui rows for iban guest claim * remove animation (#1118) * fix: formatting --------- Co-authored-by: Kushagra Sarathe <[email protected]> Co-authored-by: Mohd Zishan <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]> * fix: bank claim flow runtime error (#1138) * hotfix: make iban non optional (#1139) * fix: bank claim flow runtime error * fix: dont have iban as optional * fix: merge conflicts * fix: merge external account with bank details (#1140) * fix: add id to external account (#1142) * added tg footer (#1144) * Hotfix : add missing countries - claim as guest flow (#1146) * fix: add missing countries * remove duplicate comment * fix: show error on dynamic bank account form (#1147) * fix: Invalid IBAN for UK (#1151) --------- Co-authored-by: Mohd Zishan <[email protected]> Co-authored-by: Kushagra Sarathe <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]> * [TASK-13950] Fix: incorrect token amount on second withdraw (#1150) * fix: incorrect token amount on second withdraw * move `resetTokenContextProvider()` to unmount callback * fix: transaction explorer url for deposits * fix: history skeleton copy * save token and chain details for cross chain req-fulfilments (#1154) * fix: send links history ui for senders pov when claimed to bank accounts (#1156) * fix: sort action list methods * fix: send links claimed to bank accounts history ui for senders pov * fix: issues for request link paying with bank (#1158) - Specify recipient when creating onramp for request fulfillment - Use correct amount depending on currency * fix: stop cleaning error by bic field (#1159) We now always clear before starting submission and also bic field will always show, so that logic is not needed anymore. * fix: claim country currency and amount, fallback to $ (#1164) * feat: show local bank currency incase of bank claims * fix: activity rows for sender's send link history * fix: verification modal when claiming * fix: state issue when new user tries to claim to bank * fix: request pay copy (#1165) * fix: close kyc modal btn (#1166) * Fix testing github action (#1167) * chore: remove prettier action When commiting it clashes with signature verification rules * chore: update test action setup version * fix: install first * fix: actually make sure that cancelledDate is a Date (#1170) * fix: icon and margin (#1171) * Hide pay with wallet button in Daimo component (#1172) * hide pay with wallet button * improve targeted css approach * Fix: Daimo bug and activity receipt bug (#1175) * sligify chain name * fix: stale state issue * hide row if tokenData is not present * Fix/conflicts (#1177) * HOTFIX - IBAN country detection and incorrect bank acc details (#1094) * Fix: Iban country detection and incorrect bank acc details * Fix: update IBAN country validation to use correct locale string comparison * add validations for US and mexican bank accounts * fix typo * fix claim flow and create a reusable function for getting 3 letter code * fix country code mismatch * fix: show error below input field * remove unnecessary checks * remove unnecessary CLABE check * Prod LP v2.1 (#1098) * feat: lpv2.1 * fix: gigaclouds, font and exchange widget * fixes and improvements * remove duplicate export * remove unused component * Fix: Landing page hero section responsiveness issue (#1107) * fix: hero section responsiveness issue * fix: stars position * fix height on desktop * remove unused code * fix margins (#1113) * [TASK-14052] Prod release 105 (#1122) * feat: handle send link claims to bank account for peanut users (#1078) * reafactor: create reusable country list component and use it for all the flows * feat: reusable user accounts components * feat: handle different cases based on kyc status for bank claim * fix: account creation * chore: add docstring to hooks * chore: better comments for bank flow manager * fix: kyc modal closing after tos acceptance issue * fix: remove bank acc caching from withdraw flow * fix: update confirm claim modal copy * fix: remove bank acc caching from claim flow * fix: navheader title * remove duplicate debounce code and use `useDebounce` hook instead (#1079) * Landing page v2.1 (#1089) * lpv2.1 part 1 * Add exchange widget * add and integrate exchange API * add yourMoney component bg * update landing countries svg * integrate frankfurter API * fixes and improvements * decrease hero section height * allow max 2 decimal places * Add `/exchange` route * fix: overlay * make destination amount editable and bugg fixes * some fixes & currency improvements * crucial commit * fix checkmark, font size and weight --------- Co-authored-by: Hugo Montenegro <[email protected]> * [TASK-13186] refactor: use networkName instead of axelarChainName (#1095) * refactor: use networkName instead of axelarChainName * fix: types * fix: onramp currency (#1096) * fix: stretched favicon (#1099) * [TASK-13971] fix: scientific notation in eip681 parsing (#1097) * fix: scientific notation in eip681 parsing * fix: qr handling tests * fix: peanut sdk mock * pull iban hotfix (#1100) * fix: claim flow bugs (#1102) * fix: cross chain claim * fix: full name issue on confirm bank claim view * fix: back navigation on desktop views * Fix back button not working on /profile (#1101) * Fix back button not working * fix public profile page * extract internal navigation logic to utility function * fix: send link claims to us bank accounts (#1108) * fix: usa bank account claims * fix: show bank account details in confirm claim view * Sync Landing page changes (#1111) * reduce clouds size and update font * fix: hero section responsiveness issue * fix: formatting errors * add currency animation * fix: us bank claims after kyc for logged in users (#1112) * fix: trim account form inputs for spaces (#1114) * [TASK-14107] fix: don't allow claiming on xChain if route is not found (#1115) * fix: don't allow claiming on xChain if route is not found * fix(claim): use correct decimals for min receive amount * feat: handle redirect uri when on unsupported browsers (#1117) * feat: handle redirect uri when on unsupported browsers * fix: confirm bank claim ui rows for iban guest claim * remove animation (#1118) * fix: formatting --------- Co-authored-by: Kushagra Sarathe <[email protected]> Co-authored-by: Mohd Zishan <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]> * fix: bank claim flow runtime error (#1138) * hotfix: make iban non optional (#1139) * fix: bank claim flow runtime error * fix: dont have iban as optional * fix: merge conflicts * fix: merge external account with bank details (#1140) * fix: add id to external account (#1142) * added tg footer (#1144) * Hotfix : add missing countries - claim as guest flow (#1146) * fix: add missing countries * remove duplicate comment * fix: show error on dynamic bank account form (#1147) * fix: Invalid IBAN for UK (#1151) --------- Co-authored-by: Mohd Zishan <[email protected]> Co-authored-by: Juan José Ramírez <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]> --------- Co-authored-by: Mohd Zishan <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]> Co-authored-by: Juan José Ramírez <[email protected]> Co-authored-by: Juan José Ramírez <[email protected]> Co-authored-by: Hugo Montenegro <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.