File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Thirdweb/Thirdweb.Wallets/InAppWallet Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,14 @@ public class InAppWalletBrowser : IThirdwebBrowser
1010 private TaskCompletionSource < BrowserResult > _taskCompletionSource ;
1111 private static readonly HttpListener _httpListener = new ( ) ;
1212
13+ private readonly string _redirectHtmlOverride ;
14+
15+ public InAppWalletBrowser ( string redirectHtmlOverride = null )
16+ {
17+ _httpListener . Prefixes . Add ( "http://localhost:8080/" ) ;
18+ this . _redirectHtmlOverride = redirectHtmlOverride ;
19+ }
20+
1321 /// <summary>
1422 /// Initiates a login process using the in-app browser.
1523 /// </summary>
@@ -86,7 +94,7 @@ private void IncomingHttpRequest(IAsyncResult result)
8694 var httpContext = httpListener . EndGetContext ( result ) ;
8795 var httpRequest = httpContext . Request ;
8896 var httpResponse = httpContext . Response ;
89- var buffer = System . Text . Encoding . UTF8 . GetBytes ( Constants . REDIRECT_HTML ) ;
97+ var buffer = System . Text . Encoding . UTF8 . GetBytes ( this . _redirectHtmlOverride ?? Constants . REDIRECT_HTML ) ;
9098
9199 httpResponse . ContentLength64 = buffer . Length ;
92100 var output = httpResponse . OutputStream ;
You can’t perform that action at this time.
0 commit comments