Skip to content

chore: sync dev with main#2049

Closed
chip-peanut-bot[bot] wants to merge 3 commits into
devfrom
main
Closed

chore: sync dev with main#2049
chip-peanut-bot[bot] wants to merge 3 commits into
devfrom
main

Conversation

@chip-peanut-bot

Copy link
Copy Markdown
Contributor

Branch Sync

main is 3 commits ahead of dev.

Commits to sync:

• Fix migrated KYC withdrawal gating
• Tighten migrated Manteca KYC semantics
• Merge pull request #2041 from peanutprotocol/fix/kyc-withdrawal-gate


Auto-generated by Chip 🐿️

@vercel

vercel Bot commented May 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview, Comment May 16, 2026 8:05am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 5714.89 → 5716.08 (+1.19)
Findings: 0 net (+11 new, -11 resolved)

🆕 New findings (11)

  • high complexity — src/hooks/useIdentityVerification.tsx — CC 43, MI 61.25, SLOC 168
  • medium high-mdd — src/hooks/useIdentityVerification.tsx:108 — useIdentityVerification: MDD 59.5 (uses across many lines from declarations)
  • medium high-mdd — src/hooks/useIdentityVerification.tsx:250 — : MDD 38.0 (uses across many lines from declarations)
  • medium complexity — src/components/Home/KycCompletedModal/index.tsx — CC 29, MI 64.56, SLOC 82
  • medium complexity — src/hooks/useUnifiedKycStatus.ts — CC 25, MI 70.21, SLOC 80
  • medium high-mdd — src/hooks/useUnifiedKycStatus.ts:12 — useUnifiedKycStatus: MDD 24.9 (uses across many lines from declarations)
  • medium high-mdd — src/hooks/useIdentityVerification.tsx:160 — : MDD 22.7 (uses across many lines from declarations)
  • low high-dlt — src/components/Home/KycCompletedModal/index.tsx:14 — KycCompletedModal: DLT 19 (calls 19 distinct functions — high context load)
  • low high-dlt — src/hooks/useIdentityVerification.tsx:108 — useIdentityVerification: DLT 18 (calls 18 distinct functions — high context load)
  • low high-mdd — src/hooks/useIdentityVerification.tsx:178 — isRegionUnlocked: MDD 11.0 (uses across many lines from declarations)
  • low missing-return-type — src/hooks/useUnifiedKycStatus.ts:12 — useUnifiedKycStatus: exported fn missing return type annotation

✅ Resolved (11)

  • src/hooks/useIdentityVerification.tsx — CC 42, MI 61.35, SLOC 167
  • src/hooks/useIdentityVerification.tsx:108 — useIdentityVerification: MDD 59.8 (uses across many lines from declarations)
  • src/hooks/useIdentityVerification.tsx:251 — : MDD 38.0 (uses across many lines from declarations)
  • src/components/Home/KycCompletedModal/index.tsx — CC 28, MI 64.74, SLOC 81
  • src/hooks/useUnifiedKycStatus.ts:13 — useUnifiedKycStatus: MDD 24.5 (uses across many lines from declarations)
  • src/hooks/useIdentityVerification.tsx:161 — : MDD 22.7 (uses across many lines from declarations)
  • src/hooks/useUnifiedKycStatus.ts — CC 23, MI 70.79, SLOC 78
  • src/components/Home/KycCompletedModal/index.tsx:14 — KycCompletedModal: DLT 18 (calls 18 distinct functions — high context load)
  • src/hooks/useIdentityVerification.tsx:108 — useIdentityVerification: DLT 17 (calls 17 distinct functions — high context load)
  • src/hooks/useIdentityVerification.tsx:179 — isRegionUnlocked: MDD 11.0 (uses across many lines from declarations)
  • src/hooks/useUnifiedKycStatus.ts:13 — useUnifiedKycStatus: exported fn missing return type annotation

📈 Painscore deltas (top movers)

File Before After Δ
src/hooks/useUnifiedKycStatus.ts 5.1 5.7 +0.5

@github-actions

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • unit: 1077 ran, 0 failed, 0 skipped, 20.3s

📊 Coverage (unit)

metric %
statements 46.9%
branches 28.0%
functions 28.5%
lines 46.6%
⏱ 10 slowest test cases
time test
0.5s src/app/actions/__tests__/api-headers-extended.test.ts › should not include apiKey in updateUserById body
0.4s src/app/actions/__tests__/api-headers.test.ts › should include Content-Type in updateUserById
0.1s src/app/actions/__tests__/api-headers.test.ts › should include Content-Type in createOnrampForGuest
0.1s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › Perk claimed shows shake class + go home button
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid 9-digit US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle too long for US account
0.1s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › Manteca success, perk eligible shows hold-to-claim button
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid US account with spaces
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle invalid ETH address (too short)
0.1s src/app/actions/__tests__/api-headers-extended.test.ts › should not include apiKey in createOnrampForGuest body
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@jjramirezn

Copy link
Copy Markdown
Contributor

Superseded by #2062 — manual-merge resolution. Combines dev's helper-function cleanup with main's broader KYC matching (the migrated-cohort bugfix). See #2062 for the per-field merge rationale.

@jjramirezn jjramirezn closed this May 18, 2026
jjramirezn added a commit that referenced this pull request May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants