Skip to content

Instantly share code, notes, and snippets.

@amazingandyyy
Last active July 2, 2018 23:46
Show Gist options
  • Save amazingandyyy/571435785244ccc796c3693951711191 to your computer and use it in GitHub Desktop.
Save amazingandyyy/571435785244ccc796c3693951711191 to your computer and use it in GitHub Desktop.
async init() {
this.loading = true;
this.ui = new UiStore();
this.wallet = new WalletStore(this);
this.walletHistory = new WalletHistoryStore();
this.pubsub = new PubSubStore(this);
await this.pubsub.getSyncInfo();
runInAction(() => {
this.allEvents = new AllEventsStore(this);
this.qtumPrediction = new QtumPredictionStore(this);
this.botCourt = new BotCourtStore(this);
this.activities = {
resultSetting: new ResultSettingStore(this),
finalize: new FinalizeStore(this),
withdraw: new WithdrawStore(this),
};
this.loaded = false;
});
}
async init() {
this.loading = true;
this.global = {
ui: new UiStore(),
pubsub: new PubSubStore(this),
}
this.wallet = {
info: new WalletStore(this),
history: new WalletHistoryStore()
};
this.components = {};
await this.pubsub.getSyncInfo();
runInAction(() => {
this.components = {
allEvents: new AllEventsStore(this),
qtumPrediction: new QtumPredictionStore(this),
botCourt: new BotCourtStore(this),
activities: {
resultSetting: new ResultSettingStore(this),
finalize: new FinalizeStore(this),
withdraw: new WithdrawStore(this),
},
}
this.loading = false;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment