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()
369369 return this . PhoneNumber ;
370370 }
371371
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>
372377 public async Task < EcosystemDetails > GetEcosystemDetails ( )
373378 {
379+ if ( this . GetType ( ) . Name . Contains ( "InAppWallet" ) )
380+ {
381+ throw new InvalidOperationException ( "Cannot get ecosystem details from an InAppWallet." ) ;
382+ }
374383 var url = $ "{ EMBEDDED_WALLET_PATH_2024 } /ecosystem-wallet";
375384 var response = await this . HttpClient . GetAsync ( url ) . ConfigureAwait ( false ) ;
376385 _ = response . EnsureSuccessStatusCode ( ) ;
377386 var content = await response . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
378387 return JsonConvert . DeserializeObject < EcosystemDetails > ( content ) ;
379388 }
380389
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>
381396 public string GenerateExternalLoginLink ( string redirectUrl )
382397 {
383398 var authProvider = HttpUtility . UrlEncode ( this . AuthProvider . ToLower ( ) ) ;
You can’t perform that action at this time.
0 commit comments