From 5523c5ddd309731bbc6b40635f680b5f17c279b6 Mon Sep 17 00:00:00 2001 From: Nikki Gaudreau Date: Thu, 31 Oct 2024 23:39:00 -0400 Subject: [PATCH 1/2] Revert "Test: try playing audio" This reverts commit 9ee36ca311c9e7be4e276fcb6c472b72eaf3a006. --- client/src/index.html | 6 ------ client/src/index.ts | 11 +++++------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/client/src/index.html b/client/src/index.html index 5096424..a57624c 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -68,12 +68,6 @@ -

Wallet Test Framework

diff --git a/client/src/index.ts b/client/src/index.ts index c80a8b3..2fac172 100644 --- a/client/src/index.ts +++ b/client/src/index.ts @@ -365,10 +365,9 @@ function main() { spawn(async () => await run(window.ethereum)), ); - walletconnect.addEventListener("click", () => { - const audio = document.getElementById("audio") as HTMLAudioElement; - audio.play().catch((e) => alert(e)); - return spawn(async () => { + walletconnect.addEventListener( + "click", + spawn(async () => { const rpcMap: { [key: string]: string } = {}; rpcMap[chainId.toString()] = rpcUrl.href; const provider = await EthereumProvider.init({ @@ -389,8 +388,8 @@ function main() { await provider.connect(); await run(provider); - }); - }); + }), + ); } main(); From bd2c1ab452c3195ebacc8ed7fb43a20a2be1ab19 Mon Sep 17 00:00:00 2001 From: Nikki Gaudreau Date: Thu, 31 Oct 2024 23:58:12 -0400 Subject: [PATCH 2/2] Fix audio --- client/src/index.html | 6 ++++++ client/src/index.ts | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/client/src/index.html b/client/src/index.html index a57624c..5096424 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -68,6 +68,12 @@ +

Wallet Test Framework

diff --git a/client/src/index.ts b/client/src/index.ts index 2fac172..cac64c3 100644 --- a/client/src/index.ts +++ b/client/src/index.ts @@ -365,6 +365,10 @@ function main() { spawn(async () => await run(window.ethereum)), ); + walletconnect.addEventListener("click", () => { + const audio = document.getElementById("audio") as HTMLAudioElement; + audio.play().catch((e) => alert(e)); + }); walletconnect.addEventListener( "click", spawn(async () => {