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()
125
125
walletUI . Value . connectButton . onClick . AddListener ( ( ) => ValidateConnection ( walletUI . Key ) ) ;
126
126
}
127
127
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
+
128
140
bool usingEmailWallet = SupportedWallets . Contains ( WalletProvider . MagicLink ) || SupportedWallets . Contains ( WalletProvider . Paper ) ;
129
141
bool usingNormalWallet =
130
142
SupportedWallets . Contains ( WalletProvider . Metamask )
@@ -267,7 +279,7 @@ private async void ShowConnectedState()
267
279
{
268
280
Debug . Log ( $ "Connected to: { _address } ") ;
269
281
270
- var chainSprite = NetworkIcons . Find ( x => x . chain == _currentChainData . identifier ) ? . sprite ;
282
+ var chainSprite = NetworkIcons . Find ( x => x . chain == _currentChainData . identifier ) . sprite ;
271
283
var walletSprite = SupportedWalletsUI [ _walletProvider ] . sprite ;
272
284
var balance = await ThirdwebManager . Instance . SDK . wallet . GetBalance ( ) ;
273
285
You can’t perform that action at this time.
0 commit comments