Skip to content

Commit f82a048

Browse files
Switch Engine API endpoint to localhost for development
1 parent 0297411 commit f82a048

File tree

14 files changed

+2074
-1431
lines changed

14 files changed

+2074
-1431
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-table/types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ type ExecutionResult4337Serialized =
3434
}
3535
| {
3636
status: "FAILED";
37-
error: string;
37+
error: {
38+
stage: string;
39+
message: string;
40+
errorCode: string;
41+
inner_error: object;
42+
nonce_used: string;
43+
account_address: string;
44+
};
3845
}
3946
| {
4047
status: "SUBMITTED";

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/tx/[id]/transaction-details-ui.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@ export function TransactionDetailsUI({
4343
const status = executionResult?.status as keyof typeof statusDetails;
4444
const errorMessage =
4545
executionResult && "error" in executionResult
46-
? executionResult.error
46+
? executionResult.error.message
4747
: executionResult && "revertData" in executionResult
4848
? executionResult.revertData?.revertReason
4949
: null;
50+
const errorDetails =
51+
executionResult && "error" in executionResult
52+
? executionResult.error
53+
: undefined;
5054

5155
const chain = chainId ? idToChain.get(Number.parseInt(chainId)) : undefined;
5256
const explorer = chain?.explorers?.[0];
@@ -244,9 +248,16 @@ export function TransactionDetailsUI({
244248
</CardTitle>
245249
</CardHeader>
246250
<CardContent>
247-
<div className="rounded-md bg-destructive/10 p-4 text-destructive">
248-
{errorMessage}
249-
</div>
251+
{errorDetails ? (
252+
<CodeClient
253+
code={JSON.stringify(errorDetails, null, 2)}
254+
lang="json"
255+
/>
256+
) : (
257+
<div className="rounded-md bg-destructive/10 p-4 text-destructive">
258+
errorMessage
259+
</div>
260+
)}
250261
</CardContent>
251262
</Card>
252263
)}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { defineConfig } from "@hey-api/openapi-ts";
22

33
export default defineConfig({
4-
input: "https://engine.thirdweb.com/openapi",
5-
output: { format: "biome", lint: "biome", path: "src/client" },
6-
plugins: ["@hey-api/client-fetch"],
4+
// input: "https://engine.thirdweb.com/openapi",
5+
input: "http://localhost:3009/openapi",
6+
output: { format: "biome", lint: "biome", path: "src/client" },
7+
plugins: ["@hey-api/client-fetch"],
78
});

packages/engine/package.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,36 @@
11
{
2-
"name": "@thirdweb-dev/engine",
3-
"version": "3.0.3",
4-
"repository": {
5-
"type": "git",
6-
"url": "git+https://github.com/thirdweb-dev/js.git#main"
7-
},
8-
"license": "Apache-2.0",
2+
"author": "thirdweb eng <[email protected]>",
93
"bugs": {
104
"url": "https://github.com/thirdweb-dev/js/issues"
115
},
12-
"author": "thirdweb eng <[email protected]>",
13-
"type": "module",
14-
"main": "./dist/cjs/exports/thirdweb.js",
15-
"module": "./dist/esm/exports/thirdweb.js",
16-
"types": "./dist/types/exports/thirdweb.d.ts",
17-
"typings": "./dist/types/exports/thirdweb.d.ts",
6+
"dependencies": {
7+
"@hey-api/client-fetch": "0.10.0"
8+
},
9+
"devDependencies": {
10+
"@biomejs/biome": "2.0.4",
11+
"@hey-api/openapi-ts": "0.72.1",
12+
"rimraf": "6.0.1",
13+
"tslib": "^2.8.1"
14+
},
15+
"engines": {
16+
"node": ">=18"
17+
},
1818
"exports": {
1919
".": {
20-
"types": "./dist/types/exports/thirdweb.d.ts",
20+
"default": "./dist/cjs/exports/thirdweb.js",
2121
"import": "./dist/esm/exports/thirdweb.js",
22-
"default": "./dist/cjs/exports/thirdweb.js"
22+
"types": "./dist/types/exports/thirdweb.d.ts"
2323
},
2424
"./package.json": "./package.json"
2525
},
2626
"files": [
2727
"dist/*",
2828
"src/*"
2929
],
30-
"dependencies": {
31-
"@hey-api/client-fetch": "0.10.0"
32-
},
33-
"devDependencies": {
34-
"@biomejs/biome": "2.0.4",
35-
"@hey-api/openapi-ts": "0.72.1",
36-
"rimraf": "6.0.1",
37-
"tslib": "^2.8.1"
38-
},
30+
"license": "Apache-2.0",
31+
"main": "./dist/cjs/exports/thirdweb.js",
32+
"module": "./dist/esm/exports/thirdweb.js",
33+
"name": "@thirdweb-dev/engine",
3934
"peerDependencies": {
4035
"typescript": ">=5.0.4"
4136
},
@@ -44,18 +39,23 @@
4439
"optional": true
4540
}
4641
},
42+
"repository": {
43+
"type": "git",
44+
"url": "git+https://github.com/thirdweb-dev/js.git#main"
45+
},
4746
"scripts": {
48-
"format": "biome format ./src --write",
49-
"lint": "biome check ./src",
50-
"fix": "biome check ./src --fix",
5147
"build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types",
5248
"build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
5349
"build:esm": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json",
50+
"build:generate": "openapi-ts && pnpm format",
5451
"build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
5552
"clean": "rimraf dist",
56-
"build:generate": "openapi-ts && pnpm format"
53+
"fix": "biome check ./src --fix",
54+
"format": "biome format ./src --write",
55+
"lint": "biome check ./src"
5756
},
58-
"engines": {
59-
"node": ">=18"
60-
}
57+
"type": "module",
58+
"types": "./dist/types/exports/thirdweb.d.ts",
59+
"typings": "./dist/types/exports/thirdweb.d.ts",
60+
"version": "3.0.3"
6161
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

33
import {
4-
type Config,
5-
createClient,
6-
createConfig,
7-
type ClientOptions as DefaultClientOptions,
4+
type Config,
5+
createClient,
6+
createConfig,
7+
type ClientOptions as DefaultClientOptions,
88
} from "@hey-api/client-fetch";
99
import type { ClientOptions } from "./types.gen.js";
1010

@@ -17,12 +17,12 @@ import type { ClientOptions } from "./types.gen.js";
1717
* to ensure your client always has the correct values.
1818
*/
1919
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> =
20-
(
21-
override?: Config<DefaultClientOptions & T>,
22-
) => Config<Required<DefaultClientOptions> & T>;
20+
(
21+
override?: Config<DefaultClientOptions & T>,
22+
) => Config<Required<DefaultClientOptions> & T>;
2323

2424
export const client = createClient(
25-
createConfig<ClientOptions>({
26-
baseUrl: "https://engine.thirdweb.com",
27-
}),
25+
createConfig<ClientOptions>({
26+
baseUrl: "http://localhost:3009",
27+
}),
2828
);

0 commit comments

Comments
 (0)