diff --git a/packages/extension-base/src/services/mkt-campaign-service/index.ts b/packages/extension-base/src/services/mkt-campaign-service/index.ts index 544b44c174..44493db266 100644 --- a/packages/extension-base/src/services/mkt-campaign-service/index.ts +++ b/packages/extension-base/src/services/mkt-campaign-service/index.ts @@ -102,6 +102,7 @@ export default class MktCampaignService { } public async handleMktCampaignData (data: T[]): Promise { + await this.#state.eventService.waitAccountReady; const addresses = keyring.getPairs().map((pair) => pair.address); const allConditions: Record = this.getAllConditions(data); const conditionBalanceMap = await this.checkBalanceCondition(allConditions, addresses); diff --git a/packages/extension-koni/src/background.ts b/packages/extension-koni/src/background.ts index 08169ae09d..68748fb851 100644 --- a/packages/extension-koni/src/background.ts +++ b/packages/extension-koni/src/background.ts @@ -17,7 +17,9 @@ const actionHandler = ActionHandler.instance; actionHandler.setHandler(SWHandler.instance); -globalThis.window = globalThis.self; +if (!globalThis.window) { + globalThis.window = globalThis.self; +} cryptoWaitReady() .then((): void => {