Files
hash-wallet/lib/reactions/wallet_utils.dart
T
David AdegokeandGitHub 308de0389d CW-1368: Add Binance Smart Chain (#2836)
* feat: Add Binance Smart Chain support to wallet types and EVM chain registry

* feat: Add BSC node list and support in wallet type and chain ID mappings

* feat: Add BSC default tokens and update evm utility functions

* feat: Integrate BSC support in node settings and management

* feat: Add BSC support to config scripts and wallet type generation

* feat: Add BSC support to EVM chain ID and switcher

* feat: Extend BSC support in wallet utilities and chain type checks

* feat: Add BSC support to different wallet functions

* feat: Add BSCURI class and implement for uri handling

* feat: Update Android and iOS configurations to support BSC URL schemes

* feat: Add BSC support to different functionalities and settings

* refactor: Update wallet type name from'Binance Smart Chain' to BNB Smart Chain

* feat: Add switcher icon and updates token utils

* Review fixes

* More changes to BSC name, wallet listing and images

* Add more default tokens
2026-02-05 13:48:26 +01:00

55 lines
1.3 KiB
Dart

import 'package:cw_core/wallet_type.dart';
bool isBIP39Wallet(WalletType walletType) {
switch (walletType) {
case WalletType.ethereum:
case WalletType.polygon:
case WalletType.base:
case WalletType.arbitrum:
case WalletType.bsc:
case WalletType.solana:
case WalletType.tron:
case WalletType.bitcoin:
case WalletType.litecoin:
case WalletType.bitcoinCash:
case WalletType.nano:
case WalletType.banano:
case WalletType.monero:
case WalletType.dogecoin:
case WalletType.zcash:
return true;
case WalletType.wownero:
case WalletType.haven:
case WalletType.zano:
case WalletType.decred:
case WalletType.none:
return false;
}
}
bool isElectrumWallet(WalletType walletType) {
switch (walletType) {
case WalletType.bitcoin:
case WalletType.litecoin:
case WalletType.bitcoinCash:
return true;
default:
return false;
}
}
bool hasTokens(WalletType walletType) {
switch (walletType) {
case WalletType.ethereum:
case WalletType.polygon:
case WalletType.solana:
case WalletType.tron:
case WalletType.zano:
case WalletType.base:
case WalletType.arbitrum:
case WalletType.bsc:
return true;
default:
return false;
}
}