diff --git a/apps/tangle-dapp/src/components/ValidatorSelectionTable/ValidatorSelectionTable.tsx b/apps/tangle-dapp/src/components/ValidatorSelectionTable/ValidatorSelectionTable.tsx
index f034d6eba..83b4779c6 100644
--- a/apps/tangle-dapp/src/components/ValidatorSelectionTable/ValidatorSelectionTable.tsx
+++ b/apps/tangle-dapp/src/components/ValidatorSelectionTable/ValidatorSelectionTable.tsx
@@ -30,7 +30,6 @@ import {
} from '@webb-tools/webb-ui-components';
import { TableVariant } from '@webb-tools/webb-ui-components/components/Table/types';
import formatFractional from '@webb-tools/webb-ui-components/utils/formatFractional';
-import pluralize from '@webb-tools/webb-ui-components/utils/pluralize';
import assertSubstrateAddress from '@webb-tools/webb-ui-components/utils/assertSubstrateAddress';
import cx from 'classnames';
import {
diff --git a/apps/tangle-dapp/src/components/account/PointsReminder.tsx b/apps/tangle-dapp/src/components/account/PointsReminder.tsx
index bfa28e30d..fab836fd9 100644
--- a/apps/tangle-dapp/src/components/account/PointsReminder.tsx
+++ b/apps/tangle-dapp/src/components/account/PointsReminder.tsx
@@ -30,7 +30,7 @@ const PointsReminder: FC<{ className?: string }> = ({ className }) => {
{/** TODO: Awaiting creation of the campaign docs page. Tracked by #2708. */}
- Get Started
+ Learn More
);
diff --git a/apps/tangle-dapp/src/containers/AssetsAndBalancesTable.tsx b/apps/tangle-dapp/src/containers/AssetsAndBalancesTable.tsx
index dc565e555..4dfc0a632 100644
--- a/apps/tangle-dapp/src/containers/AssetsAndBalancesTable.tsx
+++ b/apps/tangle-dapp/src/containers/AssetsAndBalancesTable.tsx
@@ -307,6 +307,7 @@ const AssetsAndBalancesTable: FC = () => {
const isAccountConnected = useIsAccountConnected();
const nativeTokenSymbol = useNetworkStore((state) => state.nativeTokenSymbol);
const substrateAddress = useSubstrateAddress();
+ const assets = useRestakeAssetMap();
const getTotalLockedInAsset = useCallback(
(assetId: number) => {
@@ -330,30 +331,30 @@ const AssetsAndBalancesTable: FC = () => {
);
const assetRows = useMemo(() => {
- return Object.entries(balances).flatMap(([assetId, balance]) => {
- const assetDetails: (typeof assetMap)[string] | undefined =
- assetMap[assetId];
-
- if (assetDetails === undefined) {
- return [];
- }
-
+ return Object.entries(assets.assetMap).flatMap(([assetId, metadata]) => {
const cap = rewardConfig.configs[assetId]?.cap;
const capBn = cap === undefined ? undefined : new BN(cap.toString());
+ const tvl = metadata.details?.supply.toBn();
+
+ const assetBalances: (typeof balances)[string] | undefined =
+ balances[assetId];
- const tvl = assetDetails.details?.supply.toBn();
+ const available =
+ assetBalances?.balance !== undefined
+ ? new BN(assetBalances.balance.toString())
+ : BN_ZERO;
return {
type: RowType.ASSET,
- name: assetDetails.name,
+ name: metadata.name,
tvl,
- available: new BN(balance.balance.toString()),
+ available,
locked: getTotalLockedInAsset(parseInt(assetId)),
// TODO: This won't work because reward config is PER VAULT not PER ASSET. But isn't each asset its own vault?
apyFractional: rewardConfig.configs[assetId]?.apy,
// TODO: Each asset should have its own token symbol.
tokenSymbol: nativeTokenSymbol,
- decimals: assetDetails.decimals,
+ decimals: metadata.decimals,
cap: capBn,
} satisfies Row;
});