Skip to content

Commit

Permalink
fix: auth tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ganchoradkov committed Aug 29, 2024
1 parent dc3447c commit 5179b22
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/web3wallet/test/sign.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ describe("Sign Integration", () => {
core: new Core(TEST_CORE_OPTIONS),
metadata: TEST_METADATA,
});
await Promise.all([
const res = await Promise.all([
new Promise<void>((resolve) => {
web3Wallet.on("session_authenticate", async (payload) => {
const verifyContext = payload.verifyContext;
Expand Down Expand Up @@ -892,8 +892,9 @@ describe("Sign Integration", () => {
await web3Wallet.pair({ uri });
resolve();
}),
]);
const { session, auths } = await response();
response(),
]).then((res) => res[2]);
const { session, auths } = res;
expect(auths).to.exist;
expect(auths).to.be.an("array");
const walletSessions = web3Wallet.getActiveSessions();
Expand Down Expand Up @@ -952,7 +953,7 @@ describe("Sign Integration", () => {
core: new Core(TEST_CORE_OPTIONS),
metadata: TEST_METADATA,
});
await Promise.all([
const res = await Promise.all([
new Promise<void>((resolve) => {
web3Wallet.on("session_proposal", (payload) => {
const approved = buildApprovedNamespaces({
Expand Down Expand Up @@ -981,8 +982,9 @@ describe("Sign Integration", () => {
await web3Wallet.pair({ uri });
resolve();
}),
]);
const { session, auths } = await response();
response(),
]).then((res) => res[2]);
const { session, auths } = res;
expect(auths).to.be.undefined;
const walletSessions = web3Wallet.getActiveSessions();
expect(walletSessions).to.exist;
Expand Down

0 comments on commit 5179b22

Please sign in to comment.