File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Thirdweb/Thirdweb.Wallets/InAppWallet/EcosystemWallet Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -369,15 +369,30 @@ public string GetPhoneNumber()
369
369
return this . PhoneNumber ;
370
370
}
371
371
372
+ /// <summary>
373
+ /// Returns Ecosystem metadata (set in thirdweb Dashboard)
374
+ /// </summary>
375
+ /// <returns>Instance of <see cref="EcosystemDetails"/> containing metadata</returns>
376
+ /// <exception cref="InvalidOperationException">Thrown when called on an InAppWallet</exception>
372
377
public async Task < EcosystemDetails > GetEcosystemDetails ( )
373
378
{
379
+ if ( this . GetType ( ) . Name . Contains ( "InAppWallet" ) )
380
+ {
381
+ throw new InvalidOperationException ( "Cannot get ecosystem details from an InAppWallet." ) ;
382
+ }
374
383
var url = $ "{ EMBEDDED_WALLET_PATH_2024 } /ecosystem-wallet";
375
384
var response = await this . HttpClient . GetAsync ( url ) . ConfigureAwait ( false ) ;
376
385
_ = response . EnsureSuccessStatusCode ( ) ;
377
386
var content = await response . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
378
387
return JsonConvert . DeserializeObject < EcosystemDetails > ( content ) ;
379
388
}
380
389
390
+ /// <summary>
391
+ /// Returns a link that can be used to transfer the .NET wallet session to a thirdweb powered React website for seamless integration.
392
+ /// </summary>
393
+ /// <param name="redirectUrl">The URL of your thirdweb-powered website.</param>
394
+ /// <returns>The URL to redirect the user to.</returns>
395
+ /// <exception cref="InvalidOperationException">Thrown when no connected session is found</exception>
381
396
public string GenerateExternalLoginLink ( string redirectUrl )
382
397
{
383
398
var authProvider = HttpUtility . UrlEncode ( this . AuthProvider . ToLower ( ) ) ;
You can’t perform that action at this time.
0 commit comments