Skip to content

Commit 34b9742

Browse files
committed
feat: example updated.
Signed-off-by: Gaurav Goel <[email protected]>
1 parent d01e486 commit 34b9742

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

Assets/Plugins/Web3AuthSDK/Samples/Web3AuthSample.cs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ void Start()
9595
{"CUSTOM_VERIFIER", loginConfigItem}
9696
}
9797
*/
98+
authConnectionConfig = new List<AuthConnectionConfig>()
99+
{
100+
new AuthConnectionConfig()
101+
{
102+
authConnectionId = "web3auth-auth0-email-passwordless-sapphire-devnet",
103+
authConnection = AuthConnection.JWT,
104+
clientId = "d84f6xvbdV75VTGmHiMWfZLeSPk8M07C"
105+
}
106+
},
98107
clientId = "BFuUqebV5I8Pz5F7a5A2ihW7YVmbv_OHXnHYDv6OltAD5NGr6e-ViNvde3U4BHdn6HvwfkgobhVu4VwC-OSJkik",
99108
buildEnv = BuildEnv.TESTING,
100109
redirectUrl = new Uri("torusapp://com.torus.Web3AuthUnity"),
@@ -255,9 +264,14 @@ private void launchWalletServices() {
255264
chainId = "0x1",
256265
rpcTarget = "https://mainnet.infura.io/v3/daeee53504be4cd3a997d4f2718d33e0",
257266
ticker = "ETH",
258-
chainNamespace = Web3Auth.ChainNamespace.EIP155
267+
chainNamespace = Web3Auth.ChainNamespace.eip155
259268
};
260-
web3Auth.launchWalletServices(chainConfig);
269+
var chainConfigList = new List<ChainConfig> { chainConfig };
270+
foreach (var config in chainConfigList)
271+
{
272+
Debug.Log($"Chain ID: {config.chainId}, RPC Target: {config.rpcTarget}, Ticker: {config.ticker}, Namespace: {config.chainNamespace}");
273+
}
274+
web3Auth.launchWalletServices(chainConfigList, "0x1");
261275
}
262276

263277
private void request() {
@@ -267,8 +281,9 @@ private void request() {
267281
{
268282
chainId = "0x89",
269283
rpcTarget = "https://1rpc.io/matic",
270-
chainNamespace = Web3Auth.ChainNamespace.EIP155
284+
chainNamespace = Web3Auth.ChainNamespace.eip155
271285
};
286+
var chainConfigList = new List<ChainConfig> { chainConfig };
272287

273288
JArray paramsArray = new JArray
274289
{
@@ -277,7 +292,7 @@ private void request() {
277292
"Android"
278293
};
279294

280-
web3Auth.request(chainConfig, "personal_sign", paramsArray);
295+
web3Auth.request(chainConfigList, "0x89", "personal_sign", paramsArray);
281296
}
282297

283298
public string getPublicAddressFromPrivateKey(string privateKeyHex)

0 commit comments

Comments
 (0)