Skip to content

Commit

Permalink
Remove async import for Buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
yasincaliskan committed Nov 28, 2024
1 parent a9b2be3 commit 382af33
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down

0 comments on commit 382af33

Please sign in to comment.