From fdeeec9af47defd3a20e4130ee0228fdbfaaa43f Mon Sep 17 00:00:00 2001 From: aramalipoor Date: Tue, 3 Jan 2023 15:48:39 +0100 Subject: [PATCH] fix: use boolean for hideTierForUsers --- .../finance/tiered-sales/providers/TieredSalesProvider.tsx | 6 ++++-- packages/react/src/modules/finance/tiered-sales/types.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/react/src/modules/finance/tiered-sales/providers/TieredSalesProvider.tsx b/packages/react/src/modules/finance/tiered-sales/providers/TieredSalesProvider.tsx index 92d0da315..3ad8b4bb8 100644 --- a/packages/react/src/modules/finance/tiered-sales/providers/TieredSalesProvider.tsx +++ b/packages/react/src/modules/finance/tiered-sales/providers/TieredSalesProvider.tsx @@ -212,8 +212,10 @@ export const TieredSalesProvider = ({ configValuesTiers?.[tierId]?.metadataUri || diamondConfigTiers?.[tierId]?.metadataUri, hideTierForUsers: - configValuesTiers?.[tierId]?.hideTierForUsers || - diamondConfigTiers?.[tierId]?.hideTierForUsers, + ( + configValuesTiers?.[tierId]?.hideTierForUsers || + diamondConfigTiers?.[tierId]?.hideTierForUsers + )?.toString() === 'true', }; if ( diff --git a/packages/react/src/modules/finance/tiered-sales/types.ts b/packages/react/src/modules/finance/tiered-sales/types.ts index 7dc8f8355..71e93b0d1 100644 --- a/packages/react/src/modules/finance/tiered-sales/types.ts +++ b/packages/react/src/modules/finance/tiered-sales/types.ts @@ -19,7 +19,7 @@ export type Tier = { isActive?: boolean; hasAllowlist?: boolean; metadataUri?: string; - hideTierForUsers?: string; + hideTierForUsers?: boolean; // Wallet-specific minterAddress?: BytesLike;