diff --git a/apps/maestro/src/features/InterchainTokenList/InterchainTokenList.tsx b/apps/maestro/src/features/InterchainTokenList/InterchainTokenList.tsx index 024623fda..fa66fbc85 100644 --- a/apps/maestro/src/features/InterchainTokenList/InterchainTokenList.tsx +++ b/apps/maestro/src/features/InterchainTokenList/InterchainTokenList.tsx @@ -42,7 +42,11 @@ export const InterchainTokenList: FC = ({ if (hasPartialSelection) { // select the remaining tokens - unselectedTokens?.forEach((token, i) => { + const partialTokens = + unselectedTokens.length > selectedTokens.length + ? unselectedTokens + : selectedTokens; + partialTokens?.forEach((token, i) => { setTimeout(() => onToggleSelection?.(token.chainId), i * 25); }); return; @@ -51,7 +55,7 @@ export const InterchainTokenList: FC = ({ tokens?.forEach((token, i) => { setTimeout(() => onToggleSelection?.(token.chainId), i * 25); }); - }, [onToggleSelection, selectedTokens.length, tokens, unselectedTokens]); + }, [onToggleSelection, selectedTokens, tokens, unselectedTokens]); if (!tokens.length) { return null; diff --git a/apps/maestro/src/features/RecentTransactions/RecentTransactions.tsx b/apps/maestro/src/features/RecentTransactions/RecentTransactions.tsx index 4589a4143..465646d3c 100644 --- a/apps/maestro/src/features/RecentTransactions/RecentTransactions.tsx +++ b/apps/maestro/src/features/RecentTransactions/RecentTransactions.tsx @@ -1,16 +1,21 @@ import { Card, Tabs } from "@axelarjs/ui"; -import { FC, useState } from "react"; +import { useState, type FC, type ReactNode } from "react"; import { useAccount } from "wagmi"; import RecentTransactionsList from "./RecentTransactionsList"; import { CONTRACT_METHODS, type ContractMethod } from "./types"; -export const CONTRACT_METHODS_LABELS: Partial> = - { - InterchainTransfer: "Interchain Transfer", - InterchainTokenDeploymentStarted: "Token Deployment", - }; +export const CONTRACT_METHODS_LABELS: Partial< + Record +> = { + InterchainTransfer: "Interchain Transfer", + InterchainTokenDeploymentStarted: ( + <> + Interchain Token Deployment + + ), +}; type Props = { maxTransactions?: number; diff --git a/apps/maestro/src/features/SendInterchainToken/SendInterchainToken.state.ts b/apps/maestro/src/features/SendInterchainToken/SendInterchainToken.state.ts index a42417d24..df6f08a6a 100644 --- a/apps/maestro/src/features/SendInterchainToken/SendInterchainToken.state.ts +++ b/apps/maestro/src/features/SendInterchainToken/SendInterchainToken.state.ts @@ -61,7 +61,8 @@ export function useSendInterchainTokenState(props: { const eligibleTargetChains = useMemo(() => { return (referenceToken?.matchingTokens ?? []) .filter((x) => x.isRegistered && x.chainId !== props.sourceChain.chain_id) - .map((x) => computed.indexedByChainId[x.chainId ?? 0]); + .map((x) => computed.indexedByChainId[x.chainId ?? 0]) + .filter(Boolean); }, [ referenceToken?.matchingTokens, props.sourceChain.chain_id, diff --git a/apps/maestro/src/features/Transactions/Transactions.tsx b/apps/maestro/src/features/Transactions/Transactions.tsx index 59ff20b51..f6100982f 100644 --- a/apps/maestro/src/features/Transactions/Transactions.tsx +++ b/apps/maestro/src/features/Transactions/Transactions.tsx @@ -144,13 +144,28 @@ const ToastElement: FC<{ ); + const [, actions] = useTransactionsContainer(); + + const handleDismiss = useCallback(() => { + toast.dismiss(txHash); + + // dismiss permanently if tx status is error or insufficient_fee + if ( + groupedStatusesProps.some( + (x) => x.status === "error" || x.status === "insufficient_fee" + ) + ) { + actions.removeTransaction(txHash); + } + }, [actions, groupedStatusesProps, txHash]); + return (
@@ -163,11 +178,13 @@ const ToastElement: FC<{ ); }; -const GMPTransaction: FC<{ +type GMPTxStatusProps = { txHash: `0x${string}`; chainId: number; txType?: keyof typeof TX_LABEL_MAP; -}> = (props) => { +}; + +const GMPTransaction: FC = (props) => { const { computed: { chains: total, executed }, isLoading, diff --git a/apps/maestro/src/pages/index.tsx b/apps/maestro/src/pages/index.tsx index ade97a5a7..55a9f8c91 100644 --- a/apps/maestro/src/pages/index.tsx +++ b/apps/maestro/src/pages/index.tsx @@ -73,9 +73,9 @@ export default function Home() {
- RECENT INTERCHAIN TRANSACTIONS + {Boolean(chain) && "MY "}RECENT INTERCHAIN TRANSACTIONS
- +
diff --git a/apps/maestro/src/ui/layouts/MainLayout/MainLayout.tsx b/apps/maestro/src/ui/layouts/MainLayout/MainLayout.tsx index 41939694e..136f5e667 100644 --- a/apps/maestro/src/ui/layouts/MainLayout/MainLayout.tsx +++ b/apps/maestro/src/ui/layouts/MainLayout/MainLayout.tsx @@ -229,8 +229,8 @@ const TestnetBanner = ({ onClose = () => {} }) => ( New to the Interchain Token Service?

- Run a few flows in our testnet (with test tokens) and experiment here - with small amounts first. + We encourage you to experiment with{" "} + testnet first!