Skip to content

Commit efbdde5

Browse files
committed
fix: updated the sdk integration
1 parent 6a218c7 commit efbdde5

6 files changed

Lines changed: 6 additions & 80 deletions

File tree

app/zksend/lib/privacy-cash-sdk.ts

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const SUPPORTED_TOKENS = {
9494
SOL: {
9595
symbol: "SOL",
9696
name: "Solana",
97-
mint: null,
97+
mint: "So11111111111111111111111111111111111111112",
9898
decimals: 9,
9999
color: "#00ff88",
100100
isNative: true,
@@ -115,30 +115,6 @@ export const SUPPORTED_TOKENS = {
115115
color: "#ff006e",
116116
isNative: false,
117117
},
118-
ZEC: {
119-
symbol: "ZEC",
120-
name: "Zcash (Wormhole)",
121-
mint: "A7g2V9w5Q4z7J8K3mN6pL1oR5tY2uI9eW0qF3xZ7cV4b",
122-
decimals: 8,
123-
color: "#f4b728",
124-
isNative: false,
125-
},
126-
ORE: {
127-
symbol: "ORE",
128-
name: "Ore",
129-
mint: "oreoU2P8bN6jkk3jbaiVxYnG1dCXcYxwhwyK9jSyb5",
130-
decimals: 9,
131-
color: "#ff9500",
132-
isNative: false,
133-
},
134-
stORE: {
135-
symbol: "stORE",
136-
name: "Staked Ore",
137-
mint: "st8i1d8n6k9o3j4l5p7q2r4t6y8u0i1e3w5q7y9u1i3o5",
138-
decimals: 9,
139-
color: "#a855f7",
140-
isNative: false,
141-
},
142118
} as const;
143119

144120
export type TokenSymbol = keyof typeof SUPPORTED_TOKENS;
@@ -283,7 +259,7 @@ export class PrivacyCashSDK {
283259
transactionSigner: this.transactionSigner,
284260
lightWasm,
285261
storage: browserStorage,
286-
keyBasePath: "rektsafe",
262+
keyBasePath: "/wasm/rektsafe",
287263
});
288264

289265
return {
@@ -328,7 +304,7 @@ export class PrivacyCashSDK {
328304
encryptionService: encryptionServiceInstance,
329305
lightWasm,
330306
storage: browserStorage,
331-
keyBasePath: "rektsafe",
307+
keyBasePath: "/wasm/rektsafe",
332308
recipient,
333309
});
334310

lib/browser-polyfills/process.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Stub for WASM files - the actual WASM will be loaded at runtime
2-
export default new Uint8Array(0);
2+
module.exports = new Uint8Array(0);

next.config.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { NextConfig } from "next";
22
import webpack from "webpack";
3-
import CopyPlugin from "copy-webpack-plugin";
4-
import path from "path";
53

64
const nextConfig: NextConfig = {
75
output: "export",
@@ -30,9 +28,9 @@ const nextConfig: NextConfig = {
3028
require.resolve("./lib/browser-polyfills/node-localstorage.ts"),
3129
// WASM stubs - actual WASM loaded at runtime
3230
"light_wasm_hasher_bg.wasm":
33-
require.resolve("./lib/browser-polyfills/wasm-stub.ts"),
31+
require.resolve("./lib/browser-polyfills/wasm-stub.js"),
3432
"hasher_wasm_simd_bg.wasm":
35-
require.resolve("./lib/browser-polyfills/wasm-stub.ts"),
33+
require.resolve("./lib/browser-polyfills/wasm-stub.js"),
3634
};
3735

3836
config.resolve.fallback = {
@@ -52,7 +50,6 @@ const nextConfig: NextConfig = {
5250
module: false,
5351
vm: false,
5452
constants: false,
55-
// Node.js specific modules that privacycash uses
5653
child_process: false,
5754
worker_threads: false,
5855
cluster: false,
@@ -78,20 +75,6 @@ const nextConfig: NextConfig = {
7875
}),
7976
);
8077

81-
// Copy WASM files to output directory for runtime loading
82-
if (!isServer) {
83-
config.plugins.push(
84-
new CopyPlugin({
85-
patterns: [
86-
{
87-
from: path.join(__dirname, "public/wasm/*.wasm"),
88-
to: path.join(__dirname, "dist/_next/static/wasm/[name][ext]"),
89-
},
90-
],
91-
}),
92-
);
93-
}
94-
9578
return config;
9679
},
9780
};

public/wasm/rektsafe.wasm

3.06 MB
Binary file not shown.

public/wasm/rektsafe.zkey

15.7 MB
Binary file not shown.

0 commit comments

Comments
 (0)