Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Commit da1c18a

Browse files
committed
fix polyfills
1 parent cf96418 commit da1c18a

File tree

8 files changed

+11
-9
lines changed

8 files changed

+11
-9
lines changed

packages/snap-playground/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"devDependencies": {
1212
"typescript": "^5.8.2",
13-
"vite": "^6.2.0"
13+
"vite": "^6.2.0",
14+
"vite-plugin-node-polyfills": "^0.23.0"
1415
}
1516
}

packages/snap-playground/vite.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineConfig } from "vite";
2+
import { nodePolyfills } from "vite-plugin-node-polyfills";
23

34
export default defineConfig({
45
publicDir: "../snap",
@@ -7,4 +8,5 @@ export default defineConfig({
78
allow: [".."],
89
},
910
},
11+
plugins: [nodePolyfills()],
1012
});

packages/snap/snap.manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"proposedName": "Ecency Snap",
44
"description": "MetaMask Snap providing multi-chain wallet capabilities.",
55
"source": {
6-
"shasum": "+gn3cFrS+R+J+5IBVFADiePNDRkejucH5jyiRiIEnf4=",
6+
"shasum": "58XiWnnFCtB/Z/YvJSOWhAX4gosA0W9biSBrSUGxZMk=",
77
"location": {
88
"http": {
99
"url": "http://localhost:5173/dist/bundle.js"
@@ -23,4 +23,4 @@
2323
"endowment:webassembly": {}
2424
},
2525
"manifestVersion": "0.1"
26-
}
26+
}

packages/snap/vite.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { createHash } from "crypto";
44
import { defineConfig } from "vite";
55
import type { Plugin } from "vite";
66
import dtsPlugin from "vite-plugin-dts";
7-
// Polyfills are usually not needed in the snap runtime. Keep it only if you know you need specific shims.
8-
// import { nodePolyfills } from "vite-plugin-node-polyfills";
7+
import { nodePolyfills } from "vite-plugin-node-polyfills";
98

109
function updateManifestShasum(): Plugin {
1110
return {
@@ -61,7 +60,7 @@ export default defineConfig({
6160
},
6261
plugins: [
6362
dtsPlugin({ insertTypesEntry: false }),
64-
// nodePolyfills(),
63+
nodePolyfills(),
6564
updateManifestShasum(),
6665
],
6766
});

packages/wallets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "1.3.11",
55
"type": "module",
66
"license": "MIT",
7-
"main": "./dist/ecency-sdk.umd.js",
7+
"main": "./dist/ecency-sdk.es.js",
88
"module": "./dist/ecency-sdk.es.js",
99
"typings": "./dist/index.d.ts",
1010
"files": [

packages/wallets/src/modules/wallets/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ export * from "./mutations";
33
export * from "./queries";
44
export * from "./types";
55
export * from "./utils";
6+
export * from "./functions";

packages/wallets/vite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export default defineConfig({
1515
},
1616
rollupOptions: {
1717
external: [
18-
"crypto",
1918
"react",
2019
"@hiveio/dhive",
2120
"@tanstack/react-query",

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4537,7 +4537,7 @@ [email protected], typeforce@^1.11.5, typeforce@^1.18.0:
45374537
resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc"
45384538
integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==
45394539

4540-
[email protected], typescript@^5.8.2:
4540+
45414541
version "5.8.2"
45424542
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.2.tgz#8170b3702f74b79db2e5a96207c15e65807999e4"
45434543
integrity sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==

0 commit comments

Comments
 (0)