Skip to content

[TASK-15956] chore: disable bolivia kyc#1386

Merged
jjramirezn merged 1 commit intopeanut-walletfrom
chore/disable-bolivia-kyc
Oct 31, 2025
Merged

[TASK-15956] chore: disable bolivia kyc#1386
jjramirezn merged 1 commit intopeanut-walletfrom
chore/disable-bolivia-kyc

Conversation

@jjramirezn
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Oct 31, 2025

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

Project Deployment Preview Comments Updated (UTC)
peanut-wallet Building Building Preview Comment Oct 31, 2025 2:43pm

@notion-workspace
Copy link

generate 20k or 10K lin

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 31, 2025

Walkthrough

Bolivia ('BO') entry was removed from the MantecaSupportedExchanges configuration in the AddMoney constants module. The entry was commented out, preventing Bolivia from being used for exchange routing. No logic or control flow changes were introduced.

Changes

Cohort / File(s) Summary
AddMoney Constants Configuration
src/components/AddMoney/consts/index.ts
Removed Bolivia ('BO') entry from the active MantecaSupportedExchanges map (commented out)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • Hugo0
  • kushagrasathe

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description Check ❓ Inconclusive The pull request has no description provided by the author. While the check is intentionally lenient and should pass as long as the description is not completely off-topic, the absence of any description makes it impossible to evaluate whether it meets the "related in some way to the changeset" criterion. The check instructions assume there will be descriptive content to evaluate, and an empty description creates an ambiguous situation that does not clearly satisfy the pass criteria. The author should add a brief pull request description explaining the purpose and context of disabling Bolivia from the supported exchanges. Even a single sentence describing why this change is being made (e.g., temporary suspension, regulatory compliance, or other business reason) would provide helpful context for reviewers and future maintainers.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title "[TASK-15956] chore: disable bolivia kyc" directly and clearly describes the main change in the changeset, which is the removal of Bolivia from the active MantecaSupportedExchanges map in src/components/AddMoney/consts/index.ts. The title is concise, specific, and would allow a teammate scanning commit history to immediately understand that Bolivia KYC has been disabled. The task reference and descriptive language make it clear and actionable without being vague or overly broad.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/disable-bolivia-kyc

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

@jjramirezn jjramirezn changed the title [TASK-15147] chore: disable bolivia kyc [TASK-15956] chore: disable bolivia kyc Oct 31, 2025
@notion-workspace
Copy link

Copy link

@beetrootw beetrootw left a comment

Choose a reason for hiding this comment

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

lgtm

@jjramirezn jjramirezn merged commit bb1a3cf into peanut-wallet Oct 31, 2025
3 of 5 checks passed
@jjramirezn jjramirezn deleted the chore/disable-bolivia-kyc branch October 31, 2025 14:45
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 b6877f4 and b7ce34d.

📒 Files selected for processing (1)
  • src/components/AddMoney/consts/index.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-14T14:42:54.411Z
Learnt from: Zishan-7
Repo: peanutprotocol/peanut-ui PR: 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/AddMoney/consts/index.ts
⏰ 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

// MX: 'MEXICO',
//PH: 'PHILIPPINES',
BO: 'BOLIVIA',
//BO: 'BOLIVIA',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Incomplete removal: Bolivia still referenced in withdraw flow logic.

While Bolivia is commented out from MantecaSupportedExchanges, it remains hardcoded in the Manteca country checks at lines 2584 and 2637. This creates inconsistent behavior:

  • Add money flow (line 2670): Bolivia won't route to Manteca ✓
  • Withdraw flow (lines 2594-2596, 2643-2645): Bolivia will still route to Manteca ✗

Apply this diff to fully disable Bolivia from Manteca routing:

             const isMantecaCountry = [
                 'argentina',
                 'chile',
                 'brazil',
                 'colombia',
                 'panama',
                 'costa-rica',
                 'guatemala',
                 'philippines',
-                'bolivia',
             ].includes(country.path)

Also apply the same change around line 2628:

             const isMantecaCountry = [
                 'argentina',
                 'chile',
                 'brazil',
                 'colombia',
                 'panama',
                 'costa-rica',
                 'guatemala',
                 'philippines',
-                'bolivia',
             ].includes(country.path)

Run the following script to verify all references to Bolivia in the codebase:


🏁 Script executed:

#!/bin/bash
# Search for all references to Bolivia/bolivia/BO in the codebase
rg -i -n --type=ts --type=tsx --type=js --type=jsx -C3 '\b(bolivia|BO)\b' -g '!node_modules' -g '!*.lock'

Length of output: 27


🏁 Script executed:

#!/bin/bash
# Search for Bolivia/bolivia/BO references - using supported file types only
rg -i -n --type=ts --type=js -C3 '\b(bolivia|BO)\b' -g '!node_modules'

Length of output: 4220


🏁 Script executed:

#!/bin/bash
# Verify context around lines 2584 and 2637 to confirm these are in withdraw logic
echo "=== Context around line 2584 (withdraw array 1) ===" 
sed -n '2570,2595p' src/components/AddMoney/consts/index.ts

echo -e "\n=== Context around line 2637 (withdraw array 2) ===" 
sed -n '2620,2650p' src/components/AddMoney/consts/index.ts

echo -e "\n=== Check when manteca.consts.ts was added ==="
git log --oneline --follow src/constants/manteca.consts.ts 2>/dev/null | head -5 || echo "File history unavailable"

Length of output: 2987


Incomplete Bolivia removal confirmed—withdraw flow still routes to Manteca.

The review comment's findings are verified. Bolivia is correctly identified as:

  • Commented out from MantecaSupportedExchanges (line 20) ✓
  • Still hardcoded in withdraw routing checks at lines 2584 and 2637 in identical isMantecaCountry arrays ✓

Both locations are within withdraw method routing logic that explicitly directs to /withdraw/manteca when isMantecaCountry is true. This creates the inconsistency: add-money operations bypass Manteca while withdraw operations still route through it for Bolivia.

The suggested diffs in the review comment are accurate and complete for resolving this inconsistency in src/components/AddMoney/consts/index.ts.

🤖 Prompt for AI Agents
In src/components/AddMoney/consts/index.ts around line 20 and related withdraw
routing logic (see the isMantecaCountry arrays at the withdraw method lines
~2584 and ~2637), Bolivia is inconsistently handled: it’s commented out in
MantecaSupportedExchanges but still hardcoded in withdraw routing; restore
consistency by either uncommenting 'BOLIVIA' in MantecaSupportedExchanges or
removing 'BOLIVIA' from the hardcoded isMantecaCountry arrays and refactoring
the withdraw checks to use the central MantecaSupportedExchanges constant;
ensure both add-money and withdraw paths derive Manteca routing from the same
constant to prevent future drift.

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