Skip to content

Commit 4b4bf48

Browse files
committed
fix build
1 parent c287430 commit 4b4bf48

File tree

18 files changed

+24250
-19775
lines changed

18 files changed

+24250
-19775
lines changed

apps/daimo-mobile/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"stream-browserify": "^3.0.0",
104104
"text-encoding-polyfill": "^0.6.7",
105105
"ts-unused-exports": "^9.0.4",
106-
"typescript": "5.5.2",
106+
"typescript": "5.7.2",
107107
"viem": "^2.21.10",
108108
"zod": "^3.23.8"
109109
},

apps/daimo-mobile/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "expo/tsconfig.base",
33
"compilerOptions": {
4-
"strict": true
4+
"strict": true,
5+
"jsx": "react-jsx"
56
},
67
"include": ["./*.js", "./src/**/*", "./test/**/*", "app.config.ts"]
78
}

apps/daimo-testbed/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"fast-text-encoding": "^1.0.6",
2424
"react": "18.2.0",
2525
"react-native": "0.73.4",
26-
"typescript": "5.5.2"
26+
"typescript": "5.7.2"
2727
}
2828
}

apps/daimo-web/next.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
const path = require("path");
2+
const webpack = require("webpack");
3+
14
/** @type {import('next').NextConfig} */
25
const nextConfig = {
36
headers() {
@@ -28,6 +31,19 @@ const nextConfig = {
2831
loader: "ts-loader",
2932
exclude: /node_modules/,
3033
});
34+
const portoShim = path.resolve(__dirname, "shims/porto-connector.ts");
35+
config.plugins = config.plugins ?? [];
36+
config.plugins.push(
37+
new webpack.NormalModuleReplacementPlugin(
38+
/@wagmi\/connectors\/dist\/esm\/porto\.js$/,
39+
portoShim
40+
),
41+
new webpack.NormalModuleReplacementPlugin(
42+
/@wagmi\/connectors\/dist\/cjs\/porto\.js$/,
43+
portoShim
44+
)
45+
);
46+
3147
return config;
3248
},
3349
};

apps/daimo-web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"use-debounce": "^10.0.0",
3434
"viem": "^2.21.10",
3535
"wagmi": "^2.12.0",
36+
"webpack": "5.103.0",
3637
"zod": "^3.23.8"
3738
},
3839
"scripts": {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export function porto() {
2+
throw new Error("Porto connector is not supported in this build.");
3+
}
4+
5+
export default porto;
6+

apps/daimo-web/src/app/[...topLevelPage]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export async function GET(request: Request) {
4343
typeof retBody === "string"
4444
? new TextEncoder().encode(retBody).byteLength
4545
: retBody.byteLength;
46-
console.log(`[WEB] response ${ct || "unknown"} ${bodyLength}b`);
46+
console.log(`[WEB] response type ${ct || "unknown"}, ${bodyLength}b`);
4747

4848
return new Response(retBody as BodyInit, {
4949
status: res.status,

apps/daimo-web/src/app/frame/frameLinkService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ export class FrameLinkService {
146146
): Promise<string> {
147147
const apiKey = assertNotNull(envVarsWeb.DAIMO_API_KEY, "Set DAIMO_API_KEY");
148148
const preimage = `${frame.id}-${fid}-${apiKey}`;
149-
const hash = await crypto.subtle.digest("SHA-256", Buffer.from(preimage));
149+
const hash = await crypto.subtle.digest(
150+
"SHA-256",
151+
new TextEncoder().encode(preimage)
152+
);
150153
const suffix = Buffer.from(hash).toString("hex").substring(0, 6);
151154
const code = `fc-${frame.id}-${fid}-${suffix}`;
152155

apps/scratchpad/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
"zod": "^3.23.8"
2828
},
2929
"devDependencies": {
30-
"typescript": "5.5.2"
30+
"typescript": "5.7.2"
3131
}
3232
}

0 commit comments

Comments
 (0)