Skip to content

Commit ddbe3ec

Browse files
committed
feat: fix errors in UriBuilder
Signed-off-by: Gaurav Goel <[email protected]>
1 parent 9a81653 commit ddbe3ec

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Assets/Plugins/Web3AuthSDK/Samples/Web3AuthSample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void Start()
8181
}
8282
*/
8383
clientId = "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ",
84-
buildEnv = BuildEnv.TESTING,
84+
buildEnv = BuildEnv.PRODUCTION,
8585
redirectUrl = new Uri("torusapp://com.torus.Web3AuthUnity/auth"),
8686
network = Web3Auth.Network.SAPPHIRE_MAINNET,
8787
sessionTime = 86400

Assets/Plugins/Web3AuthSDK/Types/Web3AuthOptions.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,23 @@ public class Web3AuthOptions {
1111
public string sdkUrl {
1212
get {
1313
if (buildEnv == Web3Auth.BuildEnv.STAGING)
14-
return "https://staging-auth.web3auth.io/{openLoginVersion}";
14+
return "https://staging-auth.web3auth.io/v8";
1515
else if (buildEnv == Web3Auth.BuildEnv.TESTING)
1616
return "https://develop-auth.web3auth.io";
1717
else
18-
return "https://auth.web3auth.io/{openLoginVersion}";
18+
return "https://auth.web3auth.io/v8";
1919
}
2020
set { }
2121
}
22-
public const string openLoginVersion = "v8";
2322

24-
public const string walletServicesVersion = "v2";
2523
public string walletSdkUrl {
2624
get {
2725
if (buildEnv == Web3Auth.BuildEnv.STAGING)
28-
return "https://staging-wallet.web3auth.io/{walletServicesVersion}";
26+
return "https://staging-wallet.web3auth.io/v2";
2927
else if (buildEnv == Web3Auth.BuildEnv.TESTING)
3028
return "https://develop-wallet.web3auth.io";
3129
else
32-
return "https://wallet.web3auth.io/{walletServicesVersion}";
30+
return "https://wallet.web3auth.io/v2";
3331
}
3432
set { }
3533
}

Assets/Plugins/Web3AuthSDK/Web3Auth.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ private async void request(string path, LoginParams loginParams = null)
284284
})));
285285

286286
UriBuilder uriBuilder = new UriBuilder(this.web3AuthOptions.sdkUrl);
287-
uriBuilder.Path = "start";
287+
uriBuilder.Path += "/" + "start";
288288
uriBuilder.Fragment = "b64Params=" + hash;
289289
//Debug.Log("finalUriBuilderToOpen: =>" + uriBuilder.ToString());
290290

@@ -333,7 +333,7 @@ public async void launchWalletServices(ChainConfig chainConfig, string path = "w
333333
})));
334334

335335
UriBuilder uriBuilder = new UriBuilder(this.web3AuthOptions.walletSdkUrl);
336-
uriBuilder.Path = path;
336+
uriBuilder.Path += "/" + path;
337337
uriBuilder.Fragment = "b64Params=" + hash;
338338
//Debug.Log("finalUriBuilderToOpen: =>" + uriBuilder.ToString());
339339

0 commit comments

Comments
 (0)