fix wallet type resolution for arb (#3120)
What changed, and why it matters
This is a tiny one-line fix in a Dart file that maps a cryptocurrency ticker (ARB) to the correct wallet type (Arbitrum). Before the fix, selecting or handling the ARB asset may have failed because only a related ticker (arbEth) was recognized. There is no direct security exploit here; it is a functional bug fix that could only indirectly affect user funds by causing wrong wallet behavior or failed transactions.
Treat as a routine functional fix. Verify ARB wallet creation, restoration, and transaction flows in QA. No urgent security response is indicated by the diff alone.
Security signals we found
Functional bug fix with no direct security mechanism
Potential indirect user impact: failed wallet operations or misrouted transactions for ARB
No input validation, cryptographic, or authorization changes
Evidence from the diff
In cw_core/lib/wallet_type.dart, the _cryptoCurrencyToWalletType helper now returns WalletType.arbitrum for both CryptoCurrency.arbEth and CryptoCurrency.arb. The omission of CryptoCurrency.arb meant the function returned null for plain ARB, likely causing downstream wallet-type resolution to fail. The patch is partial in the sense that it only adds the missing case and does not change any surrounding logic.
Changed components
cw_core/lib/wallet_type.dartArbitrum wallet type resolutionInspect captured patch +1 / −0
diff --git a/cw_core/lib/wallet_type.dart b/cw_core/lib/wallet_type.dart
index bee9391e..05ef1417 100644
--- a/cw_core/lib/wallet_type.dart
+++ b/cw_core/lib/wallet_type.dart
@@ -286,6 +286,7 @@ WalletType? _cryptoCurrencyToWalletType(CryptoCurrency type) {
case CryptoCurrency.baseEth:
return WalletType.base;
case CryptoCurrency.arbEth:
+ case CryptoCurrency.arb:
return WalletType.arbitrum;
case CryptoCurrency.bnb:
return WalletType.bsc;
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.