File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Assets/Thirdweb/Examples/Scripts/Prefabs Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,18 @@ private void Start()
125125 walletUI . Value . connectButton . onClick . AddListener ( ( ) => ValidateConnection ( walletUI . Key ) ) ;
126126 }
127127
128+ foreach ( var chain in ThirdwebManager . Instance . supportedChains )
129+ {
130+ if ( NetworkIcons . Find ( x => x . chain == chain . identifier ) == null )
131+ NetworkIcons . Add ( new NetworkIcon ( ) { chain = chain . identifier , sprite = null } ) ;
132+ }
133+
134+ for ( int i = 0 ; i < NetworkIcons . Count ; i ++ )
135+ {
136+ if ( NetworkIcons [ i ] . sprite == null )
137+ NetworkIcons [ i ] . sprite = NetworkIcons [ 0 ] . sprite ;
138+ }
139+
128140 bool usingEmailWallet = SupportedWallets . Contains ( WalletProvider . MagicLink ) || SupportedWallets . Contains ( WalletProvider . Paper ) ;
129141 bool usingNormalWallet =
130142 SupportedWallets . Contains ( WalletProvider . Metamask )
@@ -267,7 +279,7 @@ private async void ShowConnectedState()
267279 {
268280 Debug . Log ( $ "Connected to: { _address } ") ;
269281
270- var chainSprite = NetworkIcons . Find ( x => x . chain == _currentChainData . identifier ) ? . sprite ;
282+ var chainSprite = NetworkIcons . Find ( x => x . chain == _currentChainData . identifier ) . sprite ;
271283 var walletSprite = SupportedWalletsUI [ _walletProvider ] . sprite ;
272284 var balance = await ThirdwebManager . Instance . SDK . wallet . GetBalance ( ) ;
273285
You can’t perform that action at this time.
0 commit comments