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
This commit is contained in:
David Adegoke
2026-02-05 13:48:26 +01:00
committed by GitHub
parent d05a7a91d6
commit 308de0389d
103 changed files with 609 additions and 157 deletions
+6 -1
View File
@@ -11,6 +11,7 @@ bool isEVMCompatibleChain(WalletType walletType) {
case WalletType.ethereum:
case WalletType.base:
case WalletType.arbitrum:
case WalletType.bsc:
return true;
default:
return false;
@@ -18,7 +19,6 @@ bool isEVMCompatibleChain(WalletType walletType) {
}
// Blink Protection is supported on Ethereum and Base chains
//TODO: Add BNB Smart Chain to this list when we integrate it
bool canSupportBlinkProtection(int? chainId) {
if (chainId == null) return false;
@@ -32,6 +32,7 @@ bool isNFTACtivatedChain(WalletType walletType, int? chainId) {
case 8453:
case 137:
case 42161:
case 56:
return true;
default:
return false;
@@ -53,6 +54,7 @@ bool isWalletConnectCompatibleChain(WalletType walletType) {
case WalletType.ethereum:
case WalletType.base:
case WalletType.arbitrum:
case WalletType.bsc:
return true;
default:
return false;
@@ -73,6 +75,8 @@ String getChainNameSpaceAndIdBasedOnWalletType(WalletType walletType, {int? chai
return EVMChainId.base.chain();
case WalletType.arbitrum:
return EVMChainId.arbitrum.chain();
case WalletType.bsc:
return EVMChainId.bsc.chain();
case WalletType.solana:
return SolanaChainId.mainnet.chain();
default:
@@ -86,6 +90,7 @@ List<String> getChainSupportedMethodsOnWalletType(WalletType walletType) {
case WalletType.polygon:
case WalletType.base:
case WalletType.arbitrum:
case WalletType.bsc:
return EVMSupportedMethods.values.map((e) => e.name).toList();
case WalletType.solana:
return SolanaSupportedMethods.values.map((e) => e.name).toList();
+2
View File
@@ -6,6 +6,7 @@ bool isBIP39Wallet(WalletType walletType) {
case WalletType.polygon:
case WalletType.base:
case WalletType.arbitrum:
case WalletType.bsc:
case WalletType.solana:
case WalletType.tron:
case WalletType.bitcoin:
@@ -46,6 +47,7 @@ bool hasTokens(WalletType walletType) {
case WalletType.zano:
case WalletType.base:
case WalletType.arbitrum:
case WalletType.bsc:
return true;
default:
return false;