thorswap / SwapKit

SwapKit SDK - Integrate blockchains easily. Docs - https://docs.thorswap.finance/swapkit-docs
https://swapkit.dev
Apache License 2.0
48 stars 25 forks source link

Swapkit SDK has errors #914

Closed kamalbuilds closed 1 month ago

kamalbuilds commented 1 month ago

Current behavior

Keystore wallet has a bug in the package publishing

WhatsApp Image 2024-07-16 at 23 37 47_9c01c31d

Expected behavior

The global error should not come.

Functionality

Packages

Details

Package versions:

# Paste the output of `<npm|yarn|pnpm|bun pm> ls --depth=0 | grep @swapkit` here
kamalbuilds commented 1 month ago

@mogarchy @chillios-dev can you please look into this error and fix it ?

Rotwang9000 commented 1 month ago

I came across this.. my solution was to define it

in my webpack.config.js...

const rdm = Math.floor(Math.random() * 10).toString();
window.global = {
    rdm: rdm,
};
ice-chillios commented 1 month ago

@kamalbuilds it's related to next.js building with webpack - check nextjs playground for those issues as it's there definitely to copy - I will prepare docs for different frameworks this week