Skip to content

Commit

Permalink
fix: add is congestion loading
Browse files Browse the repository at this point in the history
  • Loading branch information
brancoder committed Feb 16, 2024
1 parent c77a7ed commit fa78224
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ const buildDefaultTabsOptions = (tokensCount: number, associatedOutputCount: num
},
});

const buildAccountAddressTabsOptions = (isBlockIssuer: boolean, foundriesCount: number, isAccountFoundriesLoading: boolean) => ({
const buildAccountAddressTabsOptions = (
isBlockIssuer: boolean,
isCongestionLoading: boolean,
foundriesCount: number,
isAccountFoundriesLoading: boolean,
) => ({
[ACCOUNT_TABS.Foundries]: {
disabled: foundriesCount === 0,
hidden: foundriesCount === 0,
Expand All @@ -50,6 +55,7 @@ const buildAccountAddressTabsOptions = (isBlockIssuer: boolean, foundriesCount:
[ACCOUNT_TABS.BlockIssuance]: {
disabled: !isBlockIssuer,
hidden: !isBlockIssuer,
isLoading: isCongestionLoading,
infoContent: bicMessage,
},
});
Expand Down Expand Up @@ -111,6 +117,7 @@ export const AddressPageTabbedSections: React.FC<IAddressPageTabbedSectionsProps
...defaultTabsOptions,
...buildAccountAddressTabsOptions(
accountAddressState.blockIssuerFeature !== null,
accountAddressState.isCongestionLoading,
accountAddressState.accountOutput?.foundryCounter ?? 0,
accountAddressState.isFoundriesLoading,
),
Expand Down

0 comments on commit fa78224

Please sign in to comment.