Chip Thien

Results 12 comments of Chip Thien

I have a project with multiple modules. One module loads pyteal from another module. Symlinks are fine for this but of course require setting up properly. Another use case is...

@dete As you suspected, here are two more than can be `constant` https://github.com/axiomzen/cryptokitties-bounty/blob/03b51a8872d2438851d0ef77cfe29c74a079d26a/contracts/KittyOwnership.sol#L13 https://github.com/axiomzen/cryptokitties-bounty/blob/03b51a8872d2438851d0ef77cfe29c74a079d26a/contracts/KittyOwnership.sol#L14

@finessevanes yes for vite projects (maybe not vite 4 tho). @marherb 's solution does work, but is a little heavy handed (i.e. the string "global" is replaced with "globalThis" so...

A slightly more surgical approach is to use `"global.WebSocket": "globalThis.WebSocket",` instead of `global: "globalThis"` @marherb if you want, edit your post if it works for you

@finessevanes Did some diving because I am not using it directly. TLDR I think walletconnect v2 fixed this. I am also integrating Pera (linked above at https://github.com/perawallet/connect/issues/101) Only moderate confidence...

So you have a separate, private repo? Can we get read only access to that? I don't really understand. Congrats on the good work!

Vite 3 (maybe 2) projects can use the define plugin in your vite.config. ``` export default defineConfig({ define: { "global": "globalThis", }, plugins: [ ``` Fixes things for when you...

Vite 4 still had the problem for me. I found a solution that does not need `rollup-plugin-define`. ``` define: { "global.WebSocket": "globalThis.WebSocket", }, ```

I believe upgrading from walletconnect v1 to v2 would fix this issue (as you can see by my mention). There seem to be lots of changes in v2!

@SilentRhetoric Does `global.WebSocket = globalThis.WebSocket` work instead of replacing the entire global object?