diff --git a/src/client.ts b/src/client.ts index e04925c..2eb034a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -10,7 +10,7 @@ export class SingleEthereum extends ISingleEthereum { public events: ISingleEthereum["events"] = new EventEmitter(); public engine: ISingleEthereum["engine"]; public metadata: ISingleEthereum["metadata"]; - public chainId: number; + public chainId: ISingleEthereum["chainId"]; static async init(opts: SingleEthereumTypes.Options) { const client = new SingleEthereum(opts); diff --git a/test/auth.spec.ts b/test/auth.spec.ts index eeb27dd..25b922c 100644 --- a/test/auth.spec.ts +++ b/test/auth.spec.ts @@ -42,7 +42,7 @@ describe("Auth Integration", () => { metadata: {} as any, name: "dapp", }); - wallet = await SingleEthereum.init({ core, name: "wallet", metadata: {} as any }); + wallet = await SingleEthereum.init({ core, name: "wallet", metadata: {} as any, chainId: 1 }); expect(wallet).to.be.exist; expect(dapp).to.be.exist; expect(core).to.be.exist; diff --git a/test/sign.spec.ts b/test/sign.spec.ts index 894ae8f..3fa2b34 100644 --- a/test/sign.spec.ts +++ b/test/sign.spec.ts @@ -58,6 +58,7 @@ describe("Sign Integration", () => { core, name: "wallet", metadata: {} as any, + chainId: 1, }); await new Promise((resolve) => setTimeout(resolve, 1000)); expect(wallet).to.be.exist; @@ -671,6 +672,7 @@ describe("Sign Integration", () => { core, name: "wallet", metadata: {} as any, + chainId: 1, }); const expectedError = getSdkError("UNSUPPORTED_CHAINS"); await Promise.all([ @@ -708,6 +710,7 @@ describe("Sign Integration", () => { core, name: "wallet", metadata: {} as any, + chainId: 1, }); const expectedError = getSdkError("UNSUPPORTED_NAMESPACE_KEY"); await Promise.all([ @@ -745,6 +748,7 @@ describe("Sign Integration", () => { core, name: "wallet", metadata: {} as any, + chainId: 1, }); await Promise.all([ new Promise((resolve) => {