feat: links v2.1 req fulfilment flows#1085
feat: links v2.1 req fulfilment flows#1085kushagrasarathe merged 32 commits intopeanut-wallet-devfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughIntroduces an external_wallet payment flow and request-fulfillment context; adds managers/components for external wallet and bank fulfilment; propagates isExternalWalletFlow/headerTitle across payment views/forms; adds hooks for exchange rates and device detection; consolidates status types; refactors onramp and KYC flows; removes legacy interfaces. Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (8)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (4)
🧰 Additional context used🧠 Learnings (3)📚 Learning: 2024-10-08T20:13:42.967ZApplied to files:
📚 Learning: 2024-10-04T13:10:49.199ZApplied to files:
📚 Learning: 2024-10-07T15:25:45.170ZApplied to files:
🧬 Code graph analysis (2)src/app/[...recipient]/client.tsx (8)
src/components/TransactionDetails/transactionTransformer.ts (1)
⏰ 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)
🔇 Additional comments (20)
✨ 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: 0
🔭 Outside diff range comments (2)
src/components/Common/CountryList.tsx (2)
37-39: Inconsistent removal of claim-request filtering logicThe
supportedCountriesmemo no longer filters countries based onviewMode === 'claim-request', but theviewModedependency is still included in the useMemo dependency array on line 39. This is inconsistent since the computation doesn't actually useviewMode.Apply this fix to remove the unused dependency:
const supportedCountries = useMemo(() => { return countryData.filter((country) => country.type === 'country') - }, [viewMode]) + }, [])
95-95: Non-null assertion on potentially undefinedflowpropThe non-null assertion operator
!is used onflowwhen callingonCryptoClick(flow!), butflowis marked as optional in the props interface. This could cause a runtime error ifflowis undefined.The component should ensure
flowis defined whenviewMode === 'add-withdraw'andonCryptoClickis provided:- onClick={() => onCryptoClick(flow!)} + onClick={() => { + if (flow) { + onCryptoClick(flow) + } + }}Or better yet, make
flowrequired whenviewMode === 'add-withdraw':interface CountryListViewProps { inputTitle: string viewMode: 'claim-request' | 'add-withdraw' onCountryClick: (country: CountryData) => void onCryptoClick?: (flow: 'add' | 'withdraw') => void - flow?: 'add' | 'withdraw' + flow?: 'add' | 'withdraw' // Required when viewMode === 'add-withdraw' and onCryptoClick is provided }Then add a runtime check at the component start:
export const CountryList = ({ inputTitle, viewMode, onCountryClick, onCryptoClick, flow }: CountryListViewProps) => { + if (viewMode === 'add-withdraw' && onCryptoClick && !flow) { + throw new Error('flow prop is required when viewMode is "add-withdraw" and onCryptoClick is provided') + } const [searchTerm, setSearchTerm] = useState('')
🧹 Nitpick comments (1)
src/components/Common/CountryList.tsx (1)
119-119: StatusBadge placement might be confusingThe
StatusBadgewith status "soon" is shown asrightContentfor unsupported countries. Since the card is disabled (isDisabled={!isSupported}), users might be confused about why they can't interact with it. Consider adding a more descriptive tooltip or help text.Consider enhancing the user experience by adding a tooltip:
- rightContent={!isSupported && <StatusBadge status="soon" />} + rightContent={!isSupported && ( + <div title="Coming soon - this country is not yet supported"> + <StatusBadge status="soon" /> + </div> + )}
📜 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 (2)
src/components/Claim/Link/views/BankFlowManager.view.tsx(1 hunks)src/components/Common/CountryList.tsx(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/components/Claim/Link/views/BankFlowManager.view.tsx
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-14T14:42:54.399Z
Learnt from: Zishan-7
PR: peanutprotocol/peanut-ui#1094
File: src/utils/withdraw.utils.ts:181-191
Timestamp: 2025-08-14T14:42:54.399Z
Learning: The countryCodeMap in src/components/AddMoney/consts/index.ts uses uppercase 3-letter country codes as keys (like 'AUT', 'BEL', 'CZE') that map to 2-letter country codes, requiring input normalization to uppercase for proper lookups.
Applied to files:
src/components/Common/CountryList.tsx
📚 Learning: 2025-05-22T15:38:48.586Z
Learnt from: kushagrasarathe
PR: peanutprotocol/peanut-ui#869
File: src/app/(mobile-ui)/withdraw/page.tsx:82-88
Timestamp: 2025-05-22T15:38:48.586Z
Learning: The country-specific withdrawal route exists at src/app/(mobile-ui)/withdraw/[...country]/page.tsx and renders the AddWithdrawCountriesList component with flow="withdraw".
Applied to files:
src/components/Common/CountryList.tsx
🧬 Code Graph Analysis (1)
src/components/Common/CountryList.tsx (2)
src/components/AddMoney/consts/index.ts (1)
countryCodeMap(1974-2016)src/components/SearchUsers/SearchResultCard.tsx (1)
SearchResultCard(19-70)
⏰ 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 (1)
src/components/Common/CountryList.tsx (1)
109-113: Incorrect — country support logic is consistent (verified)Short summary: I checked the data and code. countryCodeMap uses uppercase 3-letter keys mapped to uppercase 2-letter values, and countryData.id values are uppercase (a mix of 2‑ and 3‑letter codes). CountryList.tsx already uses country.id.toUpperCase() for map lookups and compares country.id against an array containing uppercase 3‑letter keys and uppercase 2‑letter values, so the original concern about mixing uppercase keys with lowercase values is incorrect.
Files checked:
- src/components/AddMoney/consts/index.ts — countryData (ids are uppercase; mix of 2- and 3-letter codes) and countryCodeMap (3-letter → 2-letter, uppercase)
- src/components/Common/CountryList.tsx — lines ~106–112: twoLetterCountryCode lookup and isSupported logic
Action: Ignore the original comment. Optional (non-blocking) suggestion — normalize country.id (e.g., .toUpperCase()) when calling includes(...) to be defensive against any future lowercase IDs.
Likely an incorrect or invalid review comment.
jjramirezn
left a comment
There was a problem hiding this comment.
Please check all the comments
There was a problem hiding this comment.
Actionable comments posted: 5
♻️ Duplicate comments (3)
src/hooks/useGetDeviceType.ts (1)
4-8: Consolidate device detection to avoid duplication across the codebaseThis logic duplicates device/platform checks already present in utils (e.g., isAndroid in src/utils/general.utils.ts). Centralizing device detection will keep behavior consistent and easier to maintain.
Would you like me to propose a small
device.utils.tsand refactor call sites?src/hooks/useDetermineBankRequestType.ts (2)
18-21: Make requesterUserId optional to match usage and prevent callers passing empty stringsThe hook treats missing IDs as falsy and several call sites pass
?? ''. Make the param optional and update callers to pass undefined.Apply this diff:
-export function useDetermineBankRequestType(requesterUserId: string): { +export function useDetermineBankRequestType(requesterUserId?: string): { requestType: BankRequestType setRequestType: (requestType: BankRequestType) => void }Follow-up: remove empty-string fallbacks at call sites (CountryListRouter.tsx, ActionList.tsx, ReqFulfillBankFlowManager.tsx).
18-21: Review call sites using empty-string fallback for useDetermineBankRequestTypePassing
''into useDetermineBankRequestType can lead to an incorrect or default BankRequestType. Please remove the?? ''fallback and ensure a valid requesterUserId is provided (or guard these hooks against undefined upstream).Call sites to update:
- src/components/Common/CountryListRouter.tsx:53
// before useDetermineBankRequestType(chargeDetails?.requestLink.recipientAccount.userId ?? '')- src/components/Common/ActionList.tsx:86–87
// before const requesterUserId = chargeDetails?.requestLink?.recipientAccount?.userId ?? '' useDetermineBankRequestType(requesterUserId)- src/components/Request/views/ReqFulfillBankFlowManager.tsx:33
// before useDetermineBankRequestType(chargeDetails?.requestLink.recipientAccount.userId ?? '')Refactor these to either:
- Only call the hook when
userIdis non-null, or- Pass a non-empty string (e.g. throw or early-return if no userId)
🧹 Nitpick comments (11)
src/components/TransactionDetails/TransactionAvatarBadge.tsx (1)
118-120: Make status pill conditional to match TransactionCard’s behaviorCurrently showStatusPill is always true; when status is undefined this can render an empty pill. Align with TransactionCard where the pill renders only if status exists.
Apply this diff:
- showStatusPill - statusPillStatus={status} + showStatusPill={!!status} + statusPillStatus={status}src/context/RequestFulfillmentFlowContext.tsx (1)
8-15: Consistent naming: “Fulfilment” vs “Fulfillment” across exports and identifiersThere’s a mix of British and American spelling in types, enums, provider name, and error message. While it works, it increases cognitive load and risks typos/import mistakes.
Suggested direction:
- Pick one spelling project-wide (prefer your existing “RequestFulfillmentFlowContext” module name).
- Rename: ExternalWalletFulfilMethod → ExternalWalletFulfillMethod; Provider → RequestFulfillmentFlowContextProvider; all state setters to “Fulfillment”.
I can generate a codemod if you want to apply this consistently.
Also applies to: 39-40, 44-45, 95-101, 102-106
src/components/AddWithdraw/AddWithdrawCountriesList.tsx (1)
228-238: Optional: avoid transient Apple/Google Pay flicker while deviceType is unknownInitial deviceType is null until the effect runs. During that time, both Apple Pay and Google Pay may pass the filter (via the default
truebranch), causing a brief UI flicker. If you prefer no flicker, gate those methods until deviceType is resolved.Example tweak:
- const filteredAddMethods = (countryMethods.add || []).filter((method) => { + const filteredAddMethods = (countryMethods.add || []).filter((method) => { + if (deviceType === null) return method.id !== 'apple-pay-add' && method.id !== 'google-pay-add' ... })src/hooks/useDetermineBankRequestType.ts (1)
26-68: Minor resilience: clear requesterDetails when requester is unverifiedIf a previous verified requester was set and a subsequent lookup returns unverified/null, consider clearing it to avoid stale UI state.
if (requesterKycApproved) { setRequesterDetails(requesterDetails) setRequestType(BankRequestType.GuestBankRequest) } else { + setRequesterDetails(null) if (user?.user.userId) { setRequestType(BankRequestType.PayerKycNeeded) } else { setRequestType(BankRequestType.GuestKycNeeded) } }src/app/[...recipient]/client.tsx (1)
368-376: Guard managers on parsedPaymentData availabilityIf either flag becomes true before parsedPaymentData is ready (race with URL parsing), the casts (
as ParsedURL) could mask a null and crash downstream. Add a simple guard.- if (showExternalWalletFulfilMethods) { - return <ExternalWalletFulfilManager parsedPaymentData={parsedPaymentData as ParsedURL} /> - } + if (showExternalWalletFulfilMethods && parsedPaymentData) { + return <ExternalWalletFulfilManager parsedPaymentData={parsedPaymentData} /> + } @@ - if (showRequestFulfilmentBankFlowManager) { - return <ReqFulfillBankFlowManager parsedPaymentData={parsedPaymentData as ParsedURL} /> - } + if (showRequestFulfilmentBankFlowManager && parsedPaymentData) { + return <ReqFulfillBankFlowManager parsedPaymentData={parsedPaymentData} /> + }src/components/Common/CountryListRouter.tsx (3)
32-35: Update JSDoc to reflect optional props and new flow inputs.Docs still imply required
claimLinkData. Align with the actual optional props signature.- * @param {ClaimLinkData} props.claimLinkData The claim link data - * @param {ParsedURL} props.requestLinkData The request link data + * @param {('claim'|'request')} props.flow The flow type (claim or request) + * @param {ClaimLinkData=} props.claimLinkData Optional claim link data (claim flow) + * @param {ParsedURL=} props.requestLinkData Optional request link data (request flow)
124-136: Tighten useMemo deps to the actual callbacks used.The memoized props depend on
receipientType,receipientName,amount, andtokenSymbol. Using them as deps avoids stale closures and aligns with React hook best practices.- }, [flow, claimLinkData, requestLinkData, chargeDetails]) + }, [flow, receipientType, receipientName, amount, tokenSymbol])
75-90: Typo: s/receipient/recipient for local helpers.Minor, but worth fixing for consistency and readability.
- const receipientType = useCallback((): PeanutActionDetailsCardRecipientType => { + const recipientType = useCallback((): PeanutActionDetailsCardRecipientType => { ... - const receipientName = useCallback(() => { + const recipientName = useCallback(() => {And update references accordingly where these are used.
Also applies to: 92-103
src/components/Common/ActionList.tsx (2)
85-90: Avoid double subscription to the same store slice.You’re calling
usePaymentStore()twice. Destructure everything in one call to prevent redundant subscriptions and renders.- const { chargeDetails } = usePaymentStore() + const { chargeDetails, usdAmount } = usePaymentStore() - const requesterUserId = chargeDetails?.requestLink?.recipientAccount?.userId ?? '' - const { requestType } = useDetermineBankRequestType(requesterUserId) - const savedAccounts = useSavedAccounts() - const { usdAmount } = usePaymentStore() + const requesterUserId = chargeDetails?.requestLink?.recipientAccount?.userId ?? '' + const { requestType } = useDetermineBankRequestType(requesterUserId) + const savedAccounts = useSavedAccounts()
29-35: Strengthen Method.icons typing.
any[]weakens type-safety. Consider a union of acceptable icon types (e.g., string URLs or StaticImageData).-export interface Method { +export interface Method { id: string title: string description: string - icons: any[] + icons: (string | StaticImageData)[] soon: boolean }Note: import
StaticImageDatafromnext/image.src/components/AddMoney/components/AddMoneyBankDetails.tsx (1)
94-98: Normalize countryId before countryCodeMap lookup (consistency with mapping keys).countryCodeMap keys are uppercase 3-letter codes. Normalize
countryIdto uppercase before lookup.- const countryId = currentCountryDetails?.id || 'USA' - const countryCode = countryCodeMap[countryId] || countryId + const countryId = (currentCountryDetails?.id || 'USA').toUpperCase() + const countryCode = countryCodeMap[countryId] || countryId
📜 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 (24)
src/app/[...recipient]/client.tsx(9 hunks)src/components/AddMoney/components/AddMoneyBankDetails.tsx(3 hunks)src/components/AddWithdraw/AddWithdrawCountriesList.tsx(4 hunks)src/components/Claim/Link/Initial.view.tsx(3 hunks)src/components/Claim/Link/views/BankFlowManager.view.tsx(1 hunks)src/components/Common/ActionList.tsx(6 hunks)src/components/Common/CountryListRouter.tsx(1 hunks)src/components/Global/GuestVerificationModal/index.tsx(1 hunks)src/components/Global/StatusPill/index.tsx(3 hunks)src/components/LandingPage/yourMoney.tsx(0 hunks)src/components/Payment/PaymentForm/index.tsx(22 hunks)src/components/Payment/Views/Status.payment.view.tsx(7 hunks)src/components/Profile/AvatarWithBadge.tsx(2 hunks)src/components/Request/views/ExternalWalletFulfilManager.tsx(1 hunks)src/components/Request/views/ExternalWalletFulfilMethods.tsx(1 hunks)src/components/Request/views/ReqFulfillBankFlowManager.tsx(1 hunks)src/components/TransactionDetails/TransactionAvatarBadge.tsx(2 hunks)src/components/TransactionDetails/TransactionCard.tsx(2 hunks)src/components/TransactionDetails/transactionTransformer.ts(4 hunks)src/context/RequestFulfillmentFlowContext.tsx(1 hunks)src/context/contextProvider.tsx(2 hunks)src/hooks/useDetermineBankRequestType.ts(1 hunks)src/hooks/useGetDeviceType.ts(1 hunks)src/hooks/useGetExchangeRate.tsx(1 hunks)
💤 Files with no reviewable changes (1)
- src/components/LandingPage/yourMoney.tsx
🚧 Files skipped from review as they are similar to previous changes (13)
- src/components/Claim/Link/views/BankFlowManager.view.tsx
- src/components/Request/views/ExternalWalletFulfilMethods.tsx
- src/components/Request/views/ReqFulfillBankFlowManager.tsx
- src/components/Global/GuestVerificationModal/index.tsx
- src/components/TransactionDetails/transactionTransformer.ts
- src/context/contextProvider.tsx
- src/components/Profile/AvatarWithBadge.tsx
- src/components/Request/views/ExternalWalletFulfilManager.tsx
- src/components/Claim/Link/Initial.view.tsx
- src/components/Payment/Views/Status.payment.view.tsx
- src/components/Payment/PaymentForm/index.tsx
- src/components/Global/StatusPill/index.tsx
- src/hooks/useGetExchangeRate.tsx
🧰 Additional context used
🧠 Learnings (12)
📚 Learning: 2024-12-11T10:13:22.806Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#564
File: src/components/Request/Pay/Views/Initial.view.tsx:430-430
Timestamp: 2024-12-11T10:13:22.806Z
Learning: In the React TypeScript file `src/components/Request/Pay/Views/Initial.view.tsx`, when reviewing the `InitialView` component, do not flag potential issues with using non-null assertion `!` on the `slippagePercentage` variable, as handling undefined values in this context is considered out of scope.
Applied to files:
src/hooks/useDetermineBankRequestType.tssrc/components/AddMoney/components/AddMoneyBankDetails.tsxsrc/components/Common/ActionList.tsx
📚 Learning: 2025-05-22T15:38:48.586Z
Learnt from: kushagrasarathe
PR: peanutprotocol/peanut-ui#869
File: src/app/(mobile-ui)/withdraw/page.tsx:82-88
Timestamp: 2025-05-22T15:38:48.586Z
Learning: The country-specific withdrawal route exists at src/app/(mobile-ui)/withdraw/[...country]/page.tsx and renders the AddWithdrawCountriesList component with flow="withdraw".
Applied to files:
src/components/AddWithdraw/AddWithdrawCountriesList.tsxsrc/components/AddMoney/components/AddMoneyBankDetails.tsxsrc/components/Common/CountryListRouter.tsx
📚 Learning: 2025-08-14T14:42:54.411Z
Learnt from: Zishan-7
PR: peanutprotocol/peanut-ui#1094
File: src/utils/withdraw.utils.ts:181-191
Timestamp: 2025-08-14T14:42:54.411Z
Learning: The countryCodeMap in src/components/AddMoney/consts/index.ts uses uppercase 3-letter country codes as keys (like 'AUT', 'BEL', 'CZE') that map to 2-letter country codes, requiring input normalization to uppercase for proper lookups.
Applied to files:
src/components/AddWithdraw/AddWithdrawCountriesList.tsxsrc/components/AddMoney/components/AddMoneyBankDetails.tsx
📚 Learning: 2024-10-04T13:10:49.199Z
Learnt from: Hugo0
PR: peanutprotocol/peanut-ui#413
File: src/components/Request/Pay/Views/Initial.view.tsx:71-72
Timestamp: 2024-10-04T13:10:49.199Z
Learning: In `src/components/Request/Pay/Views/Initial.view.tsx`, it's acceptable to use the `!` operator in TypeScript to assert that `selectedTokenData` is not `null` or `undefined`, and potential runtime errors from accessing its properties without checks can be disregarded.
Applied to files:
src/components/AddMoney/components/AddMoneyBankDetails.tsxsrc/components/Common/ActionList.tsxsrc/app/[...recipient]/client.tsx
📚 Learning: 2024-10-07T13:42:07.299Z
Learnt from: Hugo0
PR: peanutprotocol/peanut-ui#422
File: src/components/Request/Pay/Pay.tsx:113-123
Timestamp: 2024-10-07T13:42:07.299Z
Learning: In the `PayRequestLink` component (`src/components/Request/Pay/Pay.tsx`), when resolving ENS names, handle errors by displaying an appropriate error message to the user if the ENS cannot be resolved.
Applied to files:
src/components/AddMoney/components/AddMoneyBankDetails.tsxsrc/components/Common/ActionList.tsx
📚 Learning: 2024-10-23T09:38:27.670Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#469
File: src/app/request/pay/page.tsx:32-64
Timestamp: 2024-10-23T09:38:27.670Z
Learning: In `src/app/request/pay/page.tsx`, if `linkRes` is not OK in the `generateMetadata` function, the desired behavior is to use the standard title and preview image without throwing an error.
Applied to files:
src/components/AddMoney/components/AddMoneyBankDetails.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/AddMoney/components/AddMoneyBankDetails.tsx
📚 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/AddMoney/components/AddMoneyBankDetails.tsx
📚 Learning: 2025-05-13T10:05:24.057Z
Learnt from: kushagrasarathe
PR: peanutprotocol/peanut-ui#845
File: src/components/Request/link/views/Create.request.link.view.tsx:81-81
Timestamp: 2025-05-13T10:05:24.057Z
Learning: In the peanut-ui project, pages that handle request flows (like Create.request.link.view.tsx) are only accessible to logged-in users who will always have a username, making null checks for user?.user.username unnecessary in these contexts.
Applied to files:
src/components/AddMoney/components/AddMoneyBankDetails.tsx
📚 Learning: 2024-10-08T20:13:42.967Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#422
File: src/components/Request/Pay/Pay.consts.ts:34-34
Timestamp: 2024-10-08T20:13:42.967Z
Learning: In `src/components/Request/Pay` components, the `tokenPrice` property in the `IPayScreenProps` interface is only relevant to these views. Other components using `IPayScreenProps` do not need to handle `tokenPriceData` when it's updated in these components.
Applied to files:
src/app/[...recipient]/client.tsx
📚 Learning: 2024-10-07T15:25:45.170Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#422
File: src/components/Request/Pay/Views/Initial.view.tsx:76-78
Timestamp: 2024-10-07T15:25:45.170Z
Learning: In `src/components/Request/Pay/Views/Initial.view.tsx`, both `txFee` and `utils.formatTokenAmount(...)` return strings, ensuring that `calculatedFee` consistently returns a string without the need for additional type conversion.
Applied to files:
src/app/[...recipient]/client.tsx
📚 Learning: 2025-07-24T13:26:10.290Z
Learnt from: Hugo0
PR: peanutprotocol/peanut-ui#1014
File: src/components/Claim/Link/Initial.view.tsx:413-413
Timestamp: 2025-07-24T13:26:10.290Z
Learning: In the peanut-ui repository, the change from `${SQUID_API_URL}/route` to `${SQUID_API_URL}/v2/route` in src/components/Claim/Link/Initial.view.tsx was a typo fix, not an API migration, as the codebase was already using Squid API v2.
Applied to files:
src/components/Common/CountryListRouter.tsx
🧬 Code Graph Analysis (10)
src/hooks/useDetermineBankRequestType.ts (3)
src/context/authContext.tsx (1)
useAuth(171-177)src/context/RequestFulfillmentFlowContext.tsx (1)
useRequestFulfillmentFlow(102-108)src/app/actions/users.ts (1)
getUserById(99-121)
src/components/AddWithdraw/AddWithdrawCountriesList.tsx (2)
src/hooks/useGetDeviceType.ts (1)
getDeviceType(14-32)src/components/AddMoney/consts/index.ts (1)
COUNTRY_SPECIFIC_METHODS(1945-1945)
src/hooks/useGetDeviceType.ts (1)
src/utils/general.utils.ts (1)
isAndroid(1209-1214)
src/components/TransactionDetails/TransactionAvatarBadge.tsx (1)
src/components/Global/StatusPill/index.tsx (1)
StatusPillType(5-5)
src/context/RequestFulfillmentFlowContext.tsx (3)
src/components/AddMoney/consts/index.ts (1)
CountryData(139-146)src/context/OnrampFlowContext.tsx (1)
IOnrampData(12-27)src/interfaces/interfaces.ts (1)
User(186-202)
src/components/AddMoney/components/AddMoneyBankDetails.tsx (10)
src/components/AddMoney/consts/index.ts (2)
CountryData(139-146)countryData(255-1943)src/context/OnrampFlowContext.tsx (1)
useOnrampFlow(86-92)src/context/RequestFulfillmentFlowContext.tsx (1)
useRequestFulfillmentFlow(102-108)src/redux/hooks.ts (1)
usePaymentStore(12-12)src/hooks/useGetExchangeRate.tsx (1)
useGetExchangeRate(13-53)src/utils/bridge.utils.ts (2)
getCurrencySymbol(53-60)getOnrampCurrencyConfig(39-41)src/utils/general.utils.ts (2)
formatAmount(325-365)printableAddress(70-73)src/utils/currency.ts (1)
formatCurrencyAmount(31-43)src/components/Global/PeanutActionDetailsCard/index.tsx (2)
PeanutActionDetailsCardProps(27-48)PeanutActionDetailsCard(50-235)src/components/Payment/PaymentInfoRow.tsx (1)
PaymentInfoRow(7-81)
src/components/Common/ActionList.tsx (9)
src/services/sendLinks.ts (1)
ClaimLinkData(57-57)src/lib/url-parser/types/payment.ts (1)
ParsedURL(7-16)src/context/ClaimBankFlowContext.tsx (1)
useClaimBankFlow(135-141)src/hooks/useDetermineBankClaimType.ts (1)
useDetermineBankClaimType(18-76)src/redux/hooks.ts (1)
usePaymentStore(12-12)src/hooks/useDetermineBankRequestType.ts (1)
useDetermineBankRequestType(18-71)src/hooks/useSavedAccounts.tsx (1)
useSavedAccounts(10-23)src/context/RequestFulfillmentFlowContext.tsx (1)
useRequestFulfillmentFlow(102-108)src/components/Global/GuestVerificationModal/index.tsx (1)
GuestVerificationModal(14-53)
src/app/[...recipient]/client.tsx (8)
src/context/RequestFulfillmentFlowContext.tsx (1)
useRequestFulfillmentFlow(102-108)src/components/Request/views/ExternalWalletFulfilManager.tsx (1)
ExternalWalletFulfilManager(10-67)src/lib/url-parser/types/payment.ts (1)
ParsedURL(7-16)src/components/Request/views/ReqFulfillBankFlowManager.tsx (1)
ReqFulfillBankFlowManager(28-217)src/components/Payment/Views/Initial.payment.view.tsx (1)
InitialPaymentView(3-14)src/components/Common/ActionList.tsx (1)
ActionList(80-208)src/components/Payment/Views/Confirm.payment.view.tsx (1)
ConfirmPaymentView(67-558)src/components/TransactionDetails/TransactionDetailsDrawer.tsx (1)
TransactionDetailsReceipt(94-937)
src/components/TransactionDetails/TransactionCard.tsx (1)
src/components/Global/StatusPill/index.tsx (1)
StatusPillType(5-5)
src/components/Common/CountryListRouter.tsx (11)
src/services/sendLinks.ts (1)
ClaimLinkData(57-57)src/lib/url-parser/types/payment.ts (1)
ParsedURL(7-16)src/context/ClaimBankFlowContext.tsx (1)
useClaimBankFlow(135-141)src/context/RequestFulfillmentFlowContext.tsx (1)
useRequestFulfillmentFlow(102-108)src/hooks/useSavedAccounts.tsx (1)
useSavedAccounts(10-23)src/redux/hooks.ts (1)
usePaymentStore(12-12)src/hooks/useDetermineBankRequestType.ts (1)
useDetermineBankRequestType(18-71)src/context/authContext.tsx (1)
useAuth(171-177)src/components/AddMoney/consts/index.ts (1)
CountryData(139-146)src/components/Global/PeanutActionDetailsCard/index.tsx (3)
PeanutActionDetailsCardRecipientType(25-25)PeanutActionDetailsCardTransactionType(14-23)PeanutActionDetailsCard(50-235)src/utils/general.utils.ts (2)
printableAddress(70-73)formatTokenAmount(378-399)
🪛 Biome (2.1.2)
src/components/AddWithdraw/AddWithdrawCountriesList.tsx
[error] 218-218: This hook is being called conditionally, but all hooks must be called in the exact same order in every component render.
Hooks should not be called after an early return.
For React to preserve state between calls, hooks needs to be called unconditionally and always in the same order.
See https://reactjs.org/docs/hooks-rules.html#only-call-hooks-at-the-top-level
(lint/correctness/useHookAtTopLevel)
⏰ 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 (11)
src/components/TransactionDetails/TransactionAvatarBadge.tsx (1)
13-13: LGTM: All “custom” statuses and legacy imports cleaned up
Verified across the codebase—no literal'custom'status props, no remainingStatusTypeorStatusBadgeimports, and allAvatarWithBadgecallsites correctly handleshowStatusPill. Approving these changes.src/components/TransactionDetails/TransactionCard.tsx (2)
15-15: LGTM: import switch to StatusPill/StatusPillType is consistent with the repo-wide change
31-31: Prop type update to StatusPillType is correct; aligns with StatusPill contractThis prevents passing 'custom' here, which is desirable post-migration. The conditional render
{status && <StatusPill status={status} />}is also the right pattern.src/context/RequestFulfillmentFlowContext.tsx (1)
62-93: Context value memoization looks solidValue is memoized, includes all stateful dependencies, and exposes stable setters. Reset function is memoized with useCallback. Looks good.
src/app/[...recipient]/client.tsx (5)
35-38: Flow plumbing for 'external_wallet' looks correctProp typing and the isExternalWalletFlow flag are wired consistently. No concerns here.
Also applies to: 40-44
316-325: Drawer data adjustments for external wallet are soundSwitching extraDataForDrawer to DEPOSIT, setting direction to 'add', and gating drawer auto-open for external wallet flows is coherent with the new flow.
Also applies to: 333-347
378-383: Public profile gating excludes external wallet flows — goodAvoiding the PUBLIC_PROFILE branch for external wallet is the right call to keep the flow linear.
425-450: Composing InitialPaymentView with ActionList for request flow is appropriatePassing isExternalWalletFlow and currency props is consistent. ActionList rendered below is gated by flow="request" and uses optional requestLinkData safely.
466-475: Receipt layout with NavHeader and className prop usage is cleanThe new wrapper and className usage on TransactionDetailsReceipt improves layout consistency. Redirect targets and titles for external wallet flow are sensible.
Also applies to: 479-487
src/components/Common/ActionList.tsx (1)
86-88: Good fix: safe optional-chaining added for requesterUserId.This addresses a potential runtime error when
requestLinkis missing.src/components/AddMoney/components/AddMoneyBankDetails.tsx (1)
159-184: LGTM: Flow-aware PeanutActionDetailsCard setup is correct.The transaction types, recipient types, and amount formatting match the intended add-money vs request-fulfillment behavior, including rate-aware display with a loading state.
|
@kushagrasarathe handle conflicts please |
* 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: 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 <h@hugo0.com> * [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 <h@hugo0.com> * [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 <76868364+kushagrasarathe@users.noreply.github.com> Co-authored-by: Mohd Zishan <72738005+Zishan-7@users.noreply.github.com> Co-authored-by: Hugo Montenegro <h@hugo0.com> --------- Co-authored-by: Mohd Zishan <72738005+Zishan-7@users.noreply.github.com> Co-authored-by: Kushagra Sarathe <76868364+kushagrasarathe@users.noreply.github.com> Co-authored-by: Hugo Montenegro <h@hugo0.com> * 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 <72738005+Zishan-7@users.noreply.github.com> * 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 <h@hugo0.com> * [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 <76868364+kushagrasarathe@users.noreply.github.com> Co-authored-by: Mohd Zishan <72738005+Zishan-7@users.noreply.github.com> Co-authored-by: Hugo Montenegro <h@hugo0.com> * 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 <72738005+Zishan-7@users.noreply.github.com> Co-authored-by: Kushagra Sarathe <76868364+kushagrasarathe@users.noreply.github.com> Co-authored-by: Hugo Montenegro <h@hugo0.com> Co-authored-by: Hugo Montenegro <hugo@peanut.to> * [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 <h@hugo0.com> * [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 <76868364+kushagrasarathe@users.noreply.github.com> Co-authored-by: Mohd Zishan <72738005+Zishan-7@users.noreply.github.com> Co-authored-by: Hugo Montenegro <h@hugo0.com> * 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 <72738005+Zishan-7@users.noreply.github.com> Co-authored-by: Juan José Ramírez <70615692+jjramirezn@users.noreply.github.com> Co-authored-by: Hugo Montenegro <h@hugo0.com> Co-authored-by: Hugo Montenegro <hugo@peanut.to> --------- Co-authored-by: Mohd Zishan <72738005+Zishan-7@users.noreply.github.com> Co-authored-by: Hugo Montenegro <h@hugo0.com> Co-authored-by: Juan José Ramírez <70615692+jjramirezn@users.noreply.github.com> Co-authored-by: Juan José Ramírez <artjjrn@gmail.com> Co-authored-by: Hugo Montenegro <hugo@peanut.to>
description