Skip to content

feat: add manteca claim link#1275

Merged
jjramirezn merged 1 commit intopeanut-wallet-devfrom
feat/manteca-claim-link
Oct 3, 2025
Merged

feat: add manteca claim link#1275
jjramirezn merged 1 commit intopeanut-wallet-devfrom
feat/manteca-claim-link

Conversation

@jjramirezn
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Oct 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
peanut-wallet Ready Ready Preview Comment Oct 3, 2025 0:04am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 2, 2025

Walkthrough

Adds a waitForTx boolean to the claim flow and threads it through actions, services, and the Manteca review step. Makes history completion async, adds BRIDGE_GUEST_OFFRAMP type, and integrates currency pricing/uppercasing into history processing. Updates Manteca details step with validated input and error state. Normalizes USD code checks to case-insensitive.

Changes

Cohort / File(s) Summary
Claim flow: waitForTx propagation
src/app/actions/claimLinks.ts, src/services/sendLinks.ts, src/components/Claim/Link/views/MantecaReviewStep.tsx
Added waitForTx boolean to claimSendLink signature and sendLinksApi.claim (default false), included in POST payload and call sites; review step passes waitForTx=true and reads txHash from response.
Manteca destination validation UI
src/components/Claim/Link/views/MantecaDetailsStep.view.tsx
Introduced validated input state, country-specific label, destination address validation, error alert, and stricter button disable conditions.
History completion async + pricing
src/utils/history.utils.ts, src/app/actions/history.ts
completeHistoryEntry became async, added BRIDGE_GUEST_OFFRAMP enum, integrated getCurrencyPrice to adjust amounts for bridge on/offramp paths; updated caller to await completion.
Currency code normalization in transactions
src/components/TransactionDetails/TransactionCard.tsx
Made USD checks/display case-insensitive via toUpperCase on currency.code.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • kushagrasarathe
  • Zishan-7

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning There is no pull request description provided, so it fails to describe any part of the changeset or relate to the introduced feature. Please add a concise description that outlines the purpose and scope of these changes, such as summarizing the new Manteca claim link feature and its impact on UI and underlying API behavior.
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. You can run `@coderabbitai generate docstrings` to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly identifies the primary feature added by this pull request—support for the Manteca claim link—and aligns with the key UI and API updates without unnecessary detail.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/manteca-claim-link

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sentry
Copy link

sentry bot commented Oct 2, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: src/app/actions/claimLinks.ts

Function Unhandled Issue
claimSendLink Error: HTTP error! status: 400 claimSendLink(serv...
Event Count: 25 Affected Users: 0
claimSendLink Error: Send link already claimed claimSendLink(se...
Event Count: 4 Affected Users: 0
📄 File: src/app/actions/history.ts (Click to Expand)
Function Unhandled Issue
getHistoryEntry Error: Failed to fetch history entry: Internal Server Error Page.generateMetadata (/receipt...
Event Count: 4 Affected Users: 0

@coderabbitai coderabbitai bot added the enhancement New feature or request label Oct 2, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6440834 and ec2faa4.

📒 Files selected for processing (7)
  • src/app/actions/claimLinks.ts (2 hunks)
  • src/app/actions/history.ts (1 hunks)
  • src/components/Claim/Link/views/MantecaDetailsStep.view.tsx (2 hunks)
  • src/components/Claim/Link/views/MantecaReviewStep.tsx (2 hunks)
  • src/components/TransactionDetails/TransactionCard.tsx (1 hunks)
  • src/services/sendLinks.ts (1 hunks)
  • src/utils/history.utils.ts (4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 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/views/MantecaDetailsStep.view.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/TransactionDetails/TransactionCard.tsx
🧬 Code graph analysis (6)
src/components/Claim/Link/views/MantecaReviewStep.tsx (2)
src/services/sendLinks.ts (1)
  • sendLinksApi (37-217)
src/constants/manteca.consts.ts (1)
  • MANTECA_DEPOSIT_ADDRESS (1-1)
src/services/sendLinks.ts (2)
src/services/services.types.ts (1)
  • SendLink (349-391)
src/app/actions/claimLinks.ts (1)
  • claimSendLink (86-112)
src/app/actions/history.ts (1)
src/utils/history.utils.ts (1)
  • completeHistoryEntry (188-279)
src/components/Claim/Link/views/MantecaDetailsStep.view.tsx (2)
src/constants/manteca.consts.ts (1)
  • MANTECA_COUNTRIES_CONFIG (67-120)
src/utils/withdraw.utils.ts (1)
  • validateCbuCvuAlias (160-196)
src/utils/history.utils.ts (1)
src/app/actions/currency.ts (1)
  • getCurrencyPrice (8-41)
src/components/TransactionDetails/TransactionCard.tsx (1)
src/utils/general.utils.ts (1)
  • formatNumberForDisplay (334-380)
⏰ 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

@jjramirezn jjramirezn merged commit b83becf into peanut-wallet-dev Oct 3, 2025
5 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants