Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstevens19 committed Sep 14, 2020
1 parent e4fa1a3 commit 948b41e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/components/Wallet-Leader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
id="funwallet-iframe"
is-fun-wallet="true"
is-leader="true"
:onload="leaderLoaded()"
@load="leaderLoaded"
frameborder="0"
></iframe>
</div>
Expand All @@ -26,11 +26,8 @@ export default {
},
methods: {
leaderLoaded() {
// fix this race condition
setTimeout(() => {
window.funwallet.sdk.init();
this.registerWalletEventsCallback();
}, 2000);
window.funwallet.sdk.init();
this.registerWalletEventsCallback();
},
},
};
Expand Down

0 comments on commit 948b41e

Please sign in to comment.