@turtleclub/hooks 0.5.0-beta.63 → 0.5.0-beta.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/v2/balance/hooks/usePortfolioBalance.ts +1 -1
- package/src/v2/balance/schema.ts +1 -0
- package/src/v2/supported-chains/schema.ts +6 -6
- package/src/v2/supported-tokens/schema.ts +5 -5
package/dist/index.cjs
CHANGED
|
@@ -494,13 +494,13 @@ var supportedChainStatusSchema = import_zod3.z.enum(["active", "inactive"]);
|
|
|
494
494
|
var chainSchema = import_zod3.z.object({
|
|
495
495
|
id: import_zod3.z.string(),
|
|
496
496
|
name: import_zod3.z.string(),
|
|
497
|
-
slug: import_zod3.z.string(),
|
|
497
|
+
slug: import_zod3.z.string().optional(),
|
|
498
498
|
chainId: import_zod3.z.string(),
|
|
499
|
-
isTestnet: import_zod3.z.boolean(),
|
|
500
|
-
logoUrl: import_zod3.z.string(),
|
|
501
|
-
ecosystem: supportedChainEcosystemSchema,
|
|
502
|
-
status: supportedChainStatusSchema,
|
|
503
|
-
explorerUrl: import_zod3.z.string()
|
|
499
|
+
isTestnet: import_zod3.z.boolean().optional(),
|
|
500
|
+
logoUrl: import_zod3.z.string().optional(),
|
|
501
|
+
ecosystem: supportedChainEcosystemSchema.optional(),
|
|
502
|
+
status: supportedChainStatusSchema.optional(),
|
|
503
|
+
explorerUrl: import_zod3.z.string().optional()
|
|
504
504
|
});
|
|
505
505
|
var getSupportedChainsInputSchema = import_zod3.z.object({
|
|
506
506
|
page: import_zod3.z.number().min(1).default(1).optional(),
|
|
@@ -616,12 +616,12 @@ var tokenSchema = import_zod4.z.object({
|
|
|
616
616
|
symbol: import_zod4.z.string(),
|
|
617
617
|
decimals: import_zod4.z.number().int().nonnegative(),
|
|
618
618
|
isNative: import_zod4.z.boolean(),
|
|
619
|
-
logoUrl: import_zod4.z.string(),
|
|
619
|
+
logoUrl: import_zod4.z.string().optional(),
|
|
620
620
|
chain: chainSchema,
|
|
621
|
-
priceUsd: import_zod4.z.number(),
|
|
622
|
-
canonicalAssetId: uuidSchema,
|
|
623
|
-
streamsMinAmount: import_zod4.z.string().nullable(),
|
|
624
|
-
totalTurtleTvl: import_zod4.z.number()
|
|
621
|
+
priceUsd: import_zod4.z.number().optional(),
|
|
622
|
+
canonicalAssetId: uuidSchema.optional(),
|
|
623
|
+
streamsMinAmount: import_zod4.z.string().nullable().optional(),
|
|
624
|
+
totalTurtleTvl: import_zod4.z.number().optional()
|
|
625
625
|
});
|
|
626
626
|
var supportedTokenSchema = tokenSchema.extend({
|
|
627
627
|
active: import_zod4.z.boolean()
|
|
@@ -2269,6 +2269,7 @@ var portfolioTokenSchema = import_zod17.z.object({
|
|
|
2269
2269
|
logoUrl: import_zod17.z.string().nullable(),
|
|
2270
2270
|
amount: import_zod17.z.string(),
|
|
2271
2271
|
// Portfolio-specific field (decimal format)
|
|
2272
|
+
rawAmount: import_zod17.z.string(),
|
|
2272
2273
|
price: import_zod17.z.string().nullable().transform((val) => val ? parseFloat(val) : null),
|
|
2273
2274
|
// Portfolio-specific field
|
|
2274
2275
|
// Chain with optional fields to match Portfolio API response
|
|
@@ -3426,7 +3427,8 @@ function usePortfolioBalance({
|
|
|
3426
3427
|
decimals: portfolioToken.decimals,
|
|
3427
3428
|
logoUrl: portfolioToken.logoUrl ?? void 0,
|
|
3428
3429
|
chain: getChainByChainId(chainId) ?? {
|
|
3429
|
-
id: portfolioToken.chain.id,
|
|
3430
|
+
id: portfolioToken.chain.id ?? "0",
|
|
3431
|
+
// zero as default for an empty value
|
|
3430
3432
|
chainId: portfolioToken.chain.chainId,
|
|
3431
3433
|
name: portfolioToken.chain.name ?? "",
|
|
3432
3434
|
slug: portfolioToken.chain.slug,
|