Skip to content

Commit 45e7098

Browse files
committed
adding clientId in setOptions and code refactoring
1 parent c8a4d2b commit 45e7098

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Assets/Plugins/Web3AuthSDK/Web3Auth.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class Web3Auth: MonoBehaviour
1313
{
1414
public enum Network
1515
{
16-
MAINNET, TESTNET, CYAN, AQUA
16+
MAINNET, TESTNET, CYAN, AQUA, CELESTE
1717
}
1818

1919
public enum ChainNamespace
@@ -86,6 +86,9 @@ public void setOptions(Web3AuthOptions web3AuthOptions)
8686

8787
if (this.web3AuthOptions.loginConfig != null)
8888
this.initParams["loginConfig"] = JsonConvert.SerializeObject(this.web3AuthOptions.loginConfig);
89+
90+
if (this.web3AuthOptions.clientId != null)
91+
this.initParams["clientId"] = this.web3AuthOptions.clientId;
8992

9093
}
9194

@@ -419,15 +422,15 @@ private void sessionTimeOutAPI()
419422
public string getPrivKey()
420423
{
421424
if (web3AuthResponse == null)
422-
return null
425+
return "";
423426

424-
return web3AuthOptions.useCoreKitKey.Value ? web3AuthResponse.coreKitKey : web3AuthResponse.privKey;
427+
return web3AuthOptions.useCoreKitKey.Value ? web3AuthResponse.coreKitKey : web3AuthResponse.privKey;
425428
}
426429

427430
public string getEd25519PrivKey()
428431
{
429432
if (web3AuthResponse == null)
430-
return null
433+
return "";
431434

432435
return web3AuthOptions.useCoreKitKey.Value ? web3AuthResponse.coreKitEd25519PrivKey : web3AuthResponse.ed25519PrivKey;
433436
}

0 commit comments

Comments
 (0)