Skip to content

[TASK-15520] close iframe on manteca success#1272

Merged
jjramirezn merged 4 commits intopeanut-wallet-devfrom
feat/close-iframe-on-success
Oct 2, 2025
Merged

[TASK-15520] close iframe on manteca success#1272
jjramirezn merged 4 commits intopeanut-wallet-devfrom
feat/close-iframe-on-success

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 Canceled Canceled Oct 2, 2025 6:12pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 2, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a client-side redirect guard in the mobile layout, registers a postMessage listener in the MYC modal to surface KYC success, adjusts a payment row label/text, and centralizes send-link types with updated claimSendLink/sendLinks error handling and return shapes. No exported function signatures removed.

Changes

Cohort / File(s) Summary of edits
Auth routing guard (mobile layout)
src/app/(mobile-ui)/layout.tsx
Imports useRouter and adds a client-side effect: when path is non-public, user data is not yet fetched, and no authenticated user exists, navigates to /setup. No exported API changes.
KYC modal postMessage listener
src/components/Kyc/InitiateMantecaKYCModal.tsx
Adds useEffect to subscribe to window message events and invoke onKycSuccess when event.data.source === 'peanut-kyc-success'; includes cleanup and adds useEffect import.
Payment info explanatory text
src/components/AddMoney/components/MantecaDepositShareDetails.tsx
Replaces the "Network fees" row label with "Provider fees" and adds moreInfoText explaining provider+blockchain fees; value source unchanged.
Claim API return shaping
src/app/actions/claimLinks.ts
Changes claimSendLink to return `Promise<SendLink
Send-links plumbing & re-exports
src/services/sendLinks.ts, src/services/services.types.ts
Moves/re-exports ESendLinkStatus, SendLink, SendLinkStatus into src/services/services.types.ts; sendLinks now imports those types, and claim flow throws when { error } returned by claimSendLink, otherwise returns SendLink.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • Hugo0
  • kushagrasarathe

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request lacks any description, so there is no contextual information about the intent or the scope of the changes, making it impossible for reviewers to understand the motivation behind the updates. Please add a brief description explaining the purpose of this pull request and summarizing the key changes introduced, so that reviewers can quickly grasp its intent and scope.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly identifies the core feature being implemented—closing the iframe upon Manteca success—and is concise and specific without extraneous details, making it easy for reviewers to understand the primary change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8924ca1 and d050a30.

📒 Files selected for processing (4)
  • src/app/actions/claimLinks.ts (3 hunks)
  • src/components/AddMoney/components/MantecaDepositShareDetails.tsx (1 hunks)
  • src/services/sendLinks.ts (2 hunks)
  • src/services/services.types.ts (1 hunks)

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.

@notion-workspace
Copy link

@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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1b8c7c and 2efc119.

📒 Files selected for processing (3)
  • src/app/(mobile-ui)/layout.tsx (3 hunks)
  • src/components/AddMoney/components/MantecaDepositShareDetails.tsx (1 hunks)
  • src/components/Kyc/InitiateMantecaKYCModal.tsx (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/components/AddMoney/components/MantecaDepositShareDetails.tsx (1)
src/components/Payment/PaymentInfoRow.tsx (1)
  • PaymentInfoRow (17-83)
⏰ 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/AddMoney/components/MantecaDepositShareDetails.tsx (1)

133-137: LGTM! Good UX improvement.

The added moreInfoText provides helpful context about network fees to users. The PaymentInfoRow component properly handles this prop with an accessible tooltip implementation.

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 2efc119 and 8924ca1.

📒 Files selected for processing (1)
  • src/components/Kyc/InitiateMantecaKYCModal.tsx (2 hunks)
⏰ 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/Kyc/InitiateMantecaKYCModal.tsx (1)

10-10: LGTM!

The useEffect import is correctly added to support the new message listener below.

@jjramirezn jjramirezn merged commit 12b269b into peanut-wallet-dev Oct 2, 2025
3 of 5 checks passed
@vercel vercel bot temporarily deployed to Preview – peanut-wallet October 2, 2025 18:12 Inactive
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