diff --git a/src/index.ts b/src/index.ts index bd1aa7a..501558f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,14 @@ -(async () => { - if (typeof window !== "undefined") { - // Pollyfill for Buffer - (window as any).global = window; - // eslint-disable-next-line @typescript-eslint/no-var-requires - window.Buffer = window.Buffer || (await import('buffer')).Buffer; - - import("./App"); - } -})(); +import {Buffer} from 'buffer'; + +if (typeof window !== "undefined") { + // Pollyfill for Buffer + (window as any).global = window; + // eslint-disable-next-line @typescript-eslint/no-var-requires + window.Buffer = window.Buffer || Buffer; + + import("./App"); +} + import PeraWalletConnect from "./PeraWalletConnect"; import {closePeraWalletSignTxnToast} from "./modal/peraWalletConnectModalUtils";