Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/AddMoney/consts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const MantecaSupportedExchanges = {
//GT: 'GUATEMALA',
// 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.

}

export interface CryptoSource {
Expand Down
Loading