Skip to content

Commit 8a33bdb

Browse files
committed
add prettierrc
1 parent 2a0f58a commit 8a33bdb

File tree

4 files changed

+33
-21
lines changed

4 files changed

+33
-21
lines changed

packages/react/.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"useTabs": false,
3+
"singleQuote": false,
4+
"trailingComma": "all",
5+
"printWidth": 80
6+
}

packages/sdk/.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"useTabs": false,
3+
"singleQuote": false,
4+
"trailingComma": "all",
5+
"printWidth": 80
6+
}

packages/sdk/src/internal/validators.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const numberLike = refine(
2626
(value) => {
2727
if (typeof value === "string") return !isNaN(Number(value));
2828
return true; // If it's a number or bigint, it's already valid
29-
}
29+
},
3030
);
3131

3232
const BridgeCoreSchema = object({
@@ -43,7 +43,7 @@ const BridgeCoreWithRecipientSchema = assign(
4343
BridgeCoreSchema,
4444
object({
4545
recipient: optional(hexString()),
46-
})
46+
}),
4747
);
4848

4949
const ContractCallCoreSchema = object({
@@ -59,7 +59,7 @@ const TokenContractCallSchema = assign(
5959
object({
6060
outputTokenAddress: optional(hexString()),
6161
approvalAddress: optional(hexString()),
62-
})
62+
}),
6363
);
6464

6565
const ContractCallSchema = object({
@@ -72,10 +72,10 @@ export const MultiHopSchema = BridgeCoreSchema;
7272

7373
export const SingleHopWithContractSchema = assign(
7474
BridgeCoreWithRecipientSchema,
75-
ContractCallSchema
75+
ContractCallSchema,
7676
);
7777

7878
export const MultiHopWithContractSchema = assign(
7979
BridgeCoreSchema,
80-
ContractCallSchema
80+
ContractCallSchema,
8181
);

packages/sdk/src/sprinter.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ export class Sprinter {
5757
* ```
5858
*/
5959
public async getAvailableTokens(
60-
options: FetchOptions = {}
60+
options: FetchOptions = {},
6161
): Promise<FungibleToken[]> {
6262
if (!this.#tokens)
6363
this.#tokens = await this.deferredRequest("tokens", () =>
64-
getFungibleTokens(this.makeFetchOptions(options))
64+
getFungibleTokens(this.makeFetchOptions(options)),
6565
);
6666
return this.#tokens;
6767
}
@@ -85,11 +85,11 @@ export class Sprinter {
8585
* ```
8686
*/
8787
public async getAvailableChains(
88-
options: FetchOptions = {}
88+
options: FetchOptions = {},
8989
): Promise<Chain[]> {
9090
if (!this.#chains)
9191
this.#chains = await this.deferredRequest("chains", () =>
92-
getSupportedChains(this.makeFetchOptions(options))
92+
getSupportedChains(this.makeFetchOptions(options)),
9393
);
9494
return this.#chains;
9595
}
@@ -151,7 +151,7 @@ export class Sprinter {
151151
public async getUserBalances(
152152
account: Address,
153153
tokens?: FungibleToken[],
154-
options: FetchOptions = {}
154+
options: FetchOptions = {},
155155
): Promise<AggregateBalances> {
156156
const tokenList = tokens || (await this.getAvailableTokens(options));
157157

@@ -161,8 +161,8 @@ export class Sprinter {
161161
getUserBalances(
162162
account,
163163
tokenList,
164-
this.makeFetchOptions(options || {})
165-
)
164+
this.makeFetchOptions(options || {}),
165+
),
166166
);
167167
return formatBalances([balances, nativeTokens]);
168168
}
@@ -253,7 +253,7 @@ export class Sprinter {
253253
*/
254254
public async poolAssetOnDestination(
255255
settings: Infer<typeof MultiHopSchema>,
256-
options?: FetchOptions
256+
options?: FetchOptions,
257257
): Promise<SolutionResponse> {
258258
assert(settings, MultiHopSchema);
259259

@@ -264,7 +264,7 @@ export class Sprinter {
264264
amount: BigInt(amount),
265265
whitelistedSourceChains: sourceChains,
266266
} as SolutionOptions,
267-
this.makeFetchOptions(options)
267+
this.makeFetchOptions(options),
268268
);
269269
}
270270

@@ -327,7 +327,7 @@ export class Sprinter {
327327
*/
328328
public async poolAssetOnDestinationWithHook(
329329
settings: Infer<typeof MultiHopWithContractSchema>,
330-
options?: FetchOptions
330+
options?: FetchOptions,
331331
): Promise<SolutionResponse> {
332332
assert(settings, MultiHopWithContractSchema);
333333

@@ -338,7 +338,7 @@ export class Sprinter {
338338
amount: BigInt(amount),
339339
whitelistedSourceChains: sourceChains,
340340
} as ContractSolutionOptions,
341-
this.makeFetchOptions(options)
341+
this.makeFetchOptions(options),
342342
);
343343
}
344344

@@ -385,7 +385,7 @@ export class Sprinter {
385385
*/
386386
public async transfer(
387387
settings: Infer<typeof SingleHopSchema>,
388-
options?: FetchOptions
388+
options?: FetchOptions,
389389
): Promise<SolutionResponse> {
390390
assert(settings, SingleHopSchema);
391391

@@ -396,7 +396,7 @@ export class Sprinter {
396396
amount: BigInt(amount),
397397
whitelistedSourceChains: sourceChains,
398398
} as SolutionOptions,
399-
this.makeFetchOptions(options)
399+
this.makeFetchOptions(options),
400400
);
401401
}
402402

@@ -459,7 +459,7 @@ export class Sprinter {
459459
*/
460460
public async transferWithHook(
461461
settings: Infer<typeof SingleHopWithContractSchema>,
462-
options?: FetchOptions
462+
options?: FetchOptions,
463463
): Promise<SolutionResponse> {
464464
assert(settings, SingleHopWithContractSchema);
465465

@@ -470,13 +470,13 @@ export class Sprinter {
470470
amount: BigInt(amount),
471471
whitelistedSourceChains: sourceChains,
472472
} as SolutionOptions,
473-
this.makeFetchOptions(options)
473+
this.makeFetchOptions(options),
474474
);
475475
}
476476

477477
private deferredRequest<T>(
478478
name: string,
479-
request: () => Promise<T>
479+
request: () => Promise<T>,
480480
): Promise<T> {
481481
if (!(name in this.#requests)) {
482482
this.#requests[name] = request();

0 commit comments

Comments
 (0)