diff --git a/public/index.html b/public/index.html
index 198d0473b0..29b3ba4814 100644
--- a/public/index.html
+++ b/public/index.html
@@ -34,7 +34,7 @@
diff --git a/src/services/AudiusBackend.js b/src/services/AudiusBackend.js
index 7f3525c84a..5cc78eb2d3 100644
--- a/src/services/AudiusBackend.js
+++ b/src/services/AudiusBackend.js
@@ -388,9 +388,13 @@ class AudiusBackend {
static async setup() {
// Wait for web3 to load if necessary
- if (!window.Web3) {
+ if (!window.web3Loaded) {
await new Promise(resolve => {
- window.addEventListener('WEB3_LOADED', resolve)
+ const onLoad = () => {
+ window.removeEventListener('WEB3_LOADED', onLoad)
+ resolve()
+ }
+ window.addEventListener('WEB3_LOADED', onLoad)
})
}