Skip to content

Commit 1098ddf

Browse files
lint
1 parent f834a9a commit 1098ddf

File tree

4 files changed

+42
-51
lines changed

4 files changed

+42
-51
lines changed

packages/engine/package.json

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"type": "git",
66
"url": "git+https://github.com/thirdweb-dev/js.git#main"
77
},
8+
"type": "module",
9+
"types": "./dist/types/exports/thirdweb.d.ts",
10+
"typings": "./dist/types/exports/thirdweb.d.ts",
811
"license": "Apache-2.0",
912
"bugs": {
1013
"url": "https://github.com/thirdweb-dev/js/issues"
@@ -17,9 +20,9 @@
1720
},
1821
"exports": {
1922
".": {
20-
"default": "./dist/cjs/exports/thirdweb.js",
2123
"import": "./dist/esm/exports/thirdweb.js",
22-
"types": "./dist/types/exports/thirdweb.d.ts"
24+
"types": "./dist/types/exports/thirdweb.d.ts",
25+
"default": "./dist/cjs/exports/thirdweb.js"
2326
},
2427
"./package.json": "./package.json"
2528
},
@@ -41,10 +44,6 @@
4144
"optional": true
4245
}
4346
},
44-
"repository": {
45-
"type": "git",
46-
"url": "git+https://github.com/thirdweb-dev/js.git#main"
47-
},
4847
"scripts": {
4948
"build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types",
5049
"build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
@@ -55,9 +54,5 @@
5554
"fix": "biome check --write ./src",
5655
"format": "biome format --write ./src",
5756
"lint": "biome check ./src"
58-
},
59-
"type": "module",
60-
"types": "./dist/types/exports/thirdweb.d.ts",
61-
"typings": "./dist/types/exports/thirdweb.d.ts",
62-
"version": "3.0.4"
57+
}
6358
}

packages/engine/src/configure.ts

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,51 @@ import type { Config } from "./client/client/index.js";
22
import { client } from "./client/client.gen.js";
33

44
export type EngineClientOptions = {
5-
readonly clientId?: string;
6-
readonly secretKey?: string;
5+
readonly clientId?: string;
6+
readonly secretKey?: string;
77
};
88

99
export function configure(
10-
options: EngineClientOptions & { override?: Config },
10+
options: EngineClientOptions & { override?: Config },
1111
) {
12-
client.setConfig({
13-
bodySerializer: stringify,
14-
headers: {
15-
...(options.clientId && { "x-client-id": options.clientId }),
16-
...(options.secretKey && { "x-secret-key": options.secretKey }),
17-
},
18-
...(options.override ?? {}),
19-
});
12+
client.setConfig({
13+
bodySerializer: stringify,
14+
headers: {
15+
...(options.clientId && { "x-client-id": options.clientId }),
16+
...(options.secretKey && { "x-secret-key": options.secretKey }),
17+
},
18+
...(options.override ?? {}),
19+
});
2020
}
2121

2222
function stringify(
23-
// biome-ignore lint/suspicious/noExplicitAny: JSON.stringify signature
24-
value: any,
25-
// biome-ignore lint/suspicious/noExplicitAny: JSON.stringify signature
26-
replacer?: ((this: any, key: string, value: any) => any) | null,
27-
space?: string | number,
23+
// biome-ignore lint/suspicious/noExplicitAny: JSON.stringify signature
24+
value: any,
25+
// biome-ignore lint/suspicious/noExplicitAny: JSON.stringify signature
26+
replacer?: ((this: any, key: string, value: any) => any) | null,
27+
space?: string | number,
2828
) {
29-
const res = JSON.stringify(
30-
value,
31-
(key, value_) => {
32-
const value__ = typeof value_ === "bigint" ? value_.toString() : value_;
33-
return typeof replacer === "function" ? replacer(key, value__) : value__;
34-
},
35-
space,
36-
);
37-
return res;
29+
const res = JSON.stringify(
30+
value,
31+
(key, value_) => {
32+
const value__ = typeof value_ === "bigint" ? value_.toString() : value_;
33+
return typeof replacer === "function" ? replacer(key, value__) : value__;
34+
},
35+
space,
36+
);
37+
return res;
3838
}
3939

4040
export type MaybeErrorResponse<D, E> = { result: D } | { error: E };
4141

4242
export function isErrorResponse<D, E>(
43-
res: MaybeErrorResponse<D, E>,
43+
res: MaybeErrorResponse<D, E>,
4444
): res is { error: E } {
45-
return "error" in res;
45+
return "error" in res;
4646
}
4747

4848
export function isSuccessResponse<D, E>(
49-
res: MaybeErrorResponse<D, E>,
49+
res: MaybeErrorResponse<D, E>,
5050
): res is { result: D } {
51-
return "result" in res;
51+
return "result" in res;
5252
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export type { CreateClientConfig } from "../client/client.gen.js";
22
export * from "../client/index.js";
33
export {
4-
configure,
5-
type EngineClientOptions,
6-
isErrorResponse,
7-
isSuccessResponse,
4+
configure,
5+
type EngineClientOptions,
6+
isErrorResponse,
7+
isSuccessResponse,
88
} from "../configure.js";

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentDetails.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,9 @@ export function PaymentDetails({
370370
}
371371
</>
372372
) : (
373-
<>
374-
{
375-
chainsMetadata.find(
376-
(c) => c.chainId === step.originToken.chainId,
377-
)?.name
378-
}
379-
</>
373+
chainsMetadata.find(
374+
(c) => c.chainId === step.originToken.chainId,
375+
)?.name
380376
)}
381377
</Text>
382378
</Container>

0 commit comments

Comments
 (0)