diff --git a/app/src/main/java/org/torusresearch/customauth/app/MainActivity.java b/app/src/main/java/org/torusresearch/customauth/app/MainActivity.java index 35aeb18..f2b1212 100644 --- a/app/src/main/java/org/torusresearch/customauth/app/MainActivity.java +++ b/app/src/main/java/org/torusresearch/customauth/app/MainActivity.java @@ -27,7 +27,7 @@ import org.torusresearch.customauth.types.UserCancelledException; import org.torusresearch.customauth.utils.Helpers; import org.torusresearch.fetchnodedetails.types.NodeDetails; -import org.torusresearch.fetchnodedetails.types.TorusNetwork; +import org.torusresearch.fetchnodedetails.types.Web3AuthNetwork; import org.torusresearch.torusutils.types.TorusPublicKey; import org.torusresearch.torusutils.types.VerifierArgs; @@ -77,7 +77,7 @@ protected void onCreate(Bundle savedInstanceState) { // DirectSdkArgs args = new DirectSdkArgs("torusapp://org.torusresearch.customauthandroid/redirect", TorusNetwork.TESTNET); // Option 2. Host redirect.html at your domain and proxy redirect to your app - CustomAuthArgs args = new CustomAuthArgs("https://scripts.toruswallet.io/redirect.html", TorusNetwork.TESTNET, "torusapp://org.torusresearch.customauthandroid/redirect", "YOUR_CLIENT_ID"); + CustomAuthArgs args = new CustomAuthArgs("https://scripts.toruswallet.io/redirect.html", Web3AuthNetwork.AQUA, "torusapp://org.torusresearch.customauthandroid/redirect", "YOUR_CLIENT_ID"); // args.setEnableOneKey(true); // Initialize CustomAuth diff --git a/sdk/build.gradle b/sdk/build.gradle index bb49e23..4882583 100644 --- a/sdk/build.gradle +++ b/sdk/build.gradle @@ -33,8 +33,8 @@ android { } dependencies { - api 'org.torusresearch:fetch-node-details-java:4.1.1' - api 'org.torusresearch:torus-utils-java:3.3.0' + api 'org.torusresearch:fetch-node-details-java:5.0.0' + api 'org.torusresearch:torus-utils-java:3.4.0' api 'androidx.browser:browser:1.4.0' api 'org.web3j:crypto:4.8.8-android' implementation 'com.auth0.android:jwtdecode:2.0.1' diff --git a/sdk/src/main/java/org/torusresearch/customauth/types/CustomAuthArgs.java b/sdk/src/main/java/org/torusresearch/customauth/types/CustomAuthArgs.java index cdf16ae..ebd3d5c 100644 --- a/sdk/src/main/java/org/torusresearch/customauth/types/CustomAuthArgs.java +++ b/sdk/src/main/java/org/torusresearch/customauth/types/CustomAuthArgs.java @@ -1,42 +1,42 @@ package org.torusresearch.customauth.types; -import org.torusresearch.fetchnodedetails.types.TorusNetwork; +import org.torusresearch.fetchnodedetails.types.Web3AuthNetwork; import java.util.HashMap; public class CustomAuthArgs { - public static HashMap SIGNER_MAP = new HashMap() {{ - put(TorusNetwork.MAINNET, "https://signer.tor.us"); - put(TorusNetwork.TESTNET, "https://signer.tor.us"); - put(TorusNetwork.CYAN, "https://signer-polygon.tor.us"); - put(TorusNetwork.AQUA, "https://signer-polygon.tor.us"); + public static HashMap SIGNER_MAP = new HashMap() {{ + put(Web3AuthNetwork.MAINNET, "https://signer.tor.us"); + put(Web3AuthNetwork.TESTNET, "https://signer.tor.us"); + put(Web3AuthNetwork.CYAN, "https://signer-polygon.tor.us"); + put(Web3AuthNetwork.AQUA, "https://signer-polygon.tor.us"); }}; // Android package redirect uri private final String browserRedirectUri; private String redirectUri; - private TorusNetwork network; + private Web3AuthNetwork network; private boolean enableOneKey; private String networkUrl; private String clientId; - public CustomAuthArgs(String browserRedirectUri, TorusNetwork network, String _redirectUri, String clientId) { + public CustomAuthArgs(String browserRedirectUri, Web3AuthNetwork network, String _redirectUri, String clientId) { this.redirectUri = _redirectUri; this.network = network; this.browserRedirectUri = browserRedirectUri; this.clientId = clientId; } - public CustomAuthArgs(String browserRedirectUri, TorusNetwork network, String clientId) { + public CustomAuthArgs(String browserRedirectUri, Web3AuthNetwork network, String clientId) { this(browserRedirectUri, network, "", clientId); } public CustomAuthArgs(String browserRedirectUri, String clientId) { - this(browserRedirectUri, TorusNetwork.MAINNET, "", clientId); + this(browserRedirectUri, Web3AuthNetwork.MAINNET, "", clientId); } public String getRedirectUri() { @@ -47,11 +47,11 @@ public void setRedirectUri(String redirectUri) { this.redirectUri = redirectUri; } - public TorusNetwork getNetwork() { + public Web3AuthNetwork getNetwork() { return network; } - public void setNetwork(TorusNetwork network) { + public void setNetwork(Web3AuthNetwork network) { this.network = network; }