Skip to content

Commit

Permalink
Merge pull request #56 from peterzen/exchangeratebot-race-fix
Browse files Browse the repository at this point in the history
exchangeratebot initialization race fix
  • Loading branch information
peterzen authored Apr 12, 2020
2 parents 976e0c2 + d2f0bbc commit 1dc4158
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion frontend/src/features/app/appSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ export const launchApp: ActionCreator<any> = () => {
// default flag.
// @FIXME add GUI to select default endpoint
await store.dispatch(connectDefaultWallet())
await store.dispatch(subscribeExchangeRateFeed())
await store.dispatch(subscribeExchangeRateFeed())
w.walletgui_onAppOpen()
}
}

Expand Down
5 changes: 1 addition & 4 deletions frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ ReactDOM.render(
// @TODO pass down a flag to identify dev/production mode and
// enable the below function to disable the context menu in production
// builds.
const w = window as any
const w = (window as any)
w.document.addEventListener("contextmenu", function (e: any) {
// e.preventDefault();
})

store.dispatch(launchApp())
.then(() => {
w.walletgui_onAppOpen()
})

0 comments on commit 1dc4158

Please sign in to comment.