@@ -273,12 +273,11 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
273
273
if ( walletOptions . InAppWalletOptions . AuthProvider == AuthProvider . Default )
274
274
{
275
275
await inAppWallet . SendOTP ( ) ;
276
- _ = await InAppWalletModal . VerifyOTP ( inAppWallet ) ;
276
+ _ = await InAppWalletModal . LoginWithOtp ( inAppWallet ) ;
277
277
}
278
278
else if ( walletOptions . InAppWalletOptions . AuthProvider == AuthProvider . Siwe )
279
279
{
280
- var siweSigner = walletOptions . InAppWalletOptions . SiweSigner ;
281
- _ = await inAppWallet . LoginWithSiwe ( siweSigner , walletOptions . ChainId ) ;
280
+ _ = await inAppWallet . LoginWithSiwe ( walletOptions . ChainId ) ;
282
281
}
283
282
else
284
283
{
@@ -356,6 +355,21 @@ public async Task<SmartWallet> UpgradeToSmartWallet(IThirdwebWallet personalWall
356
355
return wallet ;
357
356
}
358
357
358
+ public async Task < List < LinkedAccount > > LinkAccount ( InAppWallet mainWallet , InAppWallet walletToLink , string otp = null , BigInteger ? chainId = null , string jwtOrPayload = null )
359
+ {
360
+ return await mainWallet . LinkAccount (
361
+ walletToLink : walletToLink ,
362
+ otp : otp ,
363
+ isMobile : Application . isMobilePlatform ,
364
+ browserOpenAction : ( url ) => Application . OpenURL ( url ) ,
365
+ mobileRedirectScheme : BundleId + "://" ,
366
+ browser : new CrossPlatformUnityBrowser ( ) ,
367
+ chainId : chainId ,
368
+ jwt : jwtOrPayload ,
369
+ payload : jwtOrPayload
370
+ ) ;
371
+ }
372
+
359
373
private async void TrackUsage ( string source , string action , string walletType , string walletAddress )
360
374
{
361
375
if ( string . IsNullOrEmpty ( source ) || string . IsNullOrEmpty ( action ) || string . IsNullOrEmpty ( walletType ) || string . IsNullOrEmpty ( walletAddress ) )
0 commit comments