@@ -294,7 +294,8 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
294
294
email : walletOptions . InAppWalletOptions . Email ,
295
295
phoneNumber : walletOptions . InAppWalletOptions . PhoneNumber ,
296
296
authProvider : walletOptions . InAppWalletOptions . AuthProvider ,
297
- storageDirectoryPath : walletOptions . InAppWalletOptions . StorageDirectoryPath
297
+ storageDirectoryPath : walletOptions . InAppWalletOptions . StorageDirectoryPath ,
298
+ siweSigner : walletOptions . InAppWalletOptions . SiweSigner
298
299
) ;
299
300
break ;
300
301
case WalletProvider . EcosystemWallet :
@@ -313,7 +314,8 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
313
314
email : walletOptions . EcosystemWalletOptions . Email ,
314
315
phoneNumber : walletOptions . EcosystemWalletOptions . PhoneNumber ,
315
316
authProvider : walletOptions . EcosystemWalletOptions . AuthProvider ,
316
- storageDirectoryPath : walletOptions . EcosystemWalletOptions . StorageDirectoryPath
317
+ storageDirectoryPath : walletOptions . EcosystemWalletOptions . StorageDirectoryPath ,
318
+ siweSigner : walletOptions . EcosystemWalletOptions . SiweSigner
317
319
) ;
318
320
break ;
319
321
case WalletProvider . WalletConnectWallet :
@@ -348,6 +350,10 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
348
350
{
349
351
_ = await inAppWallet . LoginWithAuthEndpoint ( walletOptions . InAppWalletOptions . JwtOrPayload , walletOptions . InAppWalletOptions . EncryptionKey ) ;
350
352
}
353
+ else if ( walletOptions . InAppWalletOptions . AuthProvider == AuthProvider . Guest )
354
+ {
355
+ _ = await inAppWallet . LoginWithGuest ( ) ;
356
+ }
351
357
else
352
358
{
353
359
_ = await inAppWallet . LoginWithOauth (
@@ -382,6 +388,10 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
382
388
{
383
389
_ = await ecosystemWallet . LoginWithAuthEndpoint ( walletOptions . EcosystemWalletOptions . JwtOrPayload ) ;
384
390
}
391
+ else if ( walletOptions . EcosystemWalletOptions . AuthProvider == AuthProvider . Guest )
392
+ {
393
+ _ = await ecosystemWallet . LoginWithGuest ( ) ;
394
+ }
385
395
else
386
396
{
387
397
_ = await ecosystemWallet . LoginWithOauth (
@@ -472,6 +482,21 @@ public async Task<List<LinkedAccount>> LinkAccount(InAppWallet mainWallet, InApp
472
482
) ;
473
483
}
474
484
485
+ public async Task < List < LinkedAccount > > LinkAccount ( EcosystemWallet mainWallet , EcosystemWallet walletToLink , string otp = null , BigInteger ? chainId = null , string jwtOrPayload = null )
486
+ {
487
+ return await mainWallet . LinkAccount (
488
+ walletToLink : walletToLink ,
489
+ otp : otp ,
490
+ isMobile : Application . isMobilePlatform ,
491
+ browserOpenAction : ( url ) => Application . OpenURL ( url ) ,
492
+ mobileRedirectScheme : BundleId + "://" ,
493
+ browser : new CrossPlatformUnityBrowser ( ) ,
494
+ chainId : chainId ,
495
+ jwt : jwtOrPayload ,
496
+ payload : jwtOrPayload
497
+ ) ;
498
+ }
499
+
475
500
private async void TrackUsage ( string source , string action , string walletType , string walletAddress )
476
501
{
477
502
if ( string . IsNullOrEmpty ( source ) || string . IsNullOrEmpty ( action ) || string . IsNullOrEmpty ( walletType ) || string . IsNullOrEmpty ( walletAddress ) )
0 commit comments