apply dynamic token names and fix the rootIncluded if the loom state happened at the same block

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2026-11-25 12:14:28 +03:00
parent 3c68811b85
commit b125916ee5
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
4 changed files with 11 additions and 6 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "ghost-dao-interface", "name": "ghost-dao-interface",
"private": true, "private": true,
"version": "0.8.32", "version": "0.8.33",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -13,6 +13,7 @@ import Token from "../../../components/Token/Token";
import { PrimaryButton } from "../../../components/Button"; import { PrimaryButton } from "../../../components/Button";
import { useBondInfo } from "../../../hooks/bonds"; import { useBondInfo } from "../../../hooks/bonds";
import { useTokenSymbol } from "../../../hooks/tokens";
import { getTokenDecimals } from "../../../hooks/helpers"; import { getTokenDecimals } from "../../../hooks/helpers";
import { useLocalStorage } from "../../../hooks/localstorage"; import { useLocalStorage } from "../../../hooks/localstorage";
import { formatNumber, formatCurrency, shorten } from "../../../helpers"; import { formatNumber, formatCurrency, shorten } from "../../../helpers";
@ -45,6 +46,7 @@ const BondModalExodus = ({ chainId, address, isOpen, close, config, historyRecor
if (historyRecord === null) return null; if (historyRecord === null) return null;
const { network } = useParams(); const { network } = useParams();
const { CONSTANTS } = useLocalStorage(); const { CONSTANTS } = useLocalStorage();
const [copiedIndex, setCopiedIndex] = useState(null); const [copiedIndex, setCopiedIndex] = useState(null);
const copyToClipboard = (text, index) => { const copyToClipboard = (text, index) => {
@ -63,6 +65,8 @@ const BondModalExodus = ({ chainId, address, isOpen, close, config, historyRecor
}; };
}, [config]); }, [config]);
const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO");
const { data: receipt, isLoading, error } = useTransactionReceipt({ const { data: receipt, isLoading, error } = useTransactionReceipt({
hash: historyRecord?.txHash, hash: historyRecord?.txHash,
query: { query: {
@ -160,7 +164,7 @@ const BondModalExodus = ({ chainId, address, isOpen, close, config, historyRecor
{!voluntaryVerification && <Box width="100%" display="flex" flexDirection="column" justifyContent="space-around" alignItems="center"> {!voluntaryVerification && <Box width="100%" display="flex" flexDirection="column" justifyContent="space-around" alignItems="center">
<Box display="flex" justifyContent="space-between" width="100%"> <Box display="flex" justifyContent="space-between" width="100%">
<Typography>Exodus Reward</Typography> <Typography>Exodus Reward</Typography>
<Typography>{formatCurrency(stakedAmount, 5, "FTSO")}</Typography> <Typography>{formatCurrency(stakedAmount, 5, ftsoSymbol)}</Typography>
</Box> </Box>
<Box display="flex" justifyContent="space-between" width="100%"> <Box display="flex" justifyContent="space-between" width="100%">

View File

@ -241,7 +241,7 @@ const BridgeInModal = ({ chainId, isOpen, close, config, historyRecord }) => {
const rootIncluded = useMemo(() => { const rootIncluded = useMemo(() => {
if (!loomState || !receipt) return false; if (!loomState || !receipt) return false;
return evmMerkleRoot === loomState.root_hash && receipt.blockNumber < loomState.at_block; return evmMerkleRoot === loomState.root_hash && receipt.blockNumber <= loomState.at_block;
}, [loomState, receipt, evmMerkleRoot]); }, [loomState, receipt, evmMerkleRoot]);
const weaverArgs = useMemo(() => { const weaverArgs = useMemo(() => {

View File

@ -61,7 +61,7 @@ const HistoryItem = ({
const isVerySmallScreen = useMediaQuery("(max-width: 450px)"); const isVerySmallScreen = useMediaQuery("(max-width: 450px)");
const localString = new Date(item.submitted).toLocaleString(); const localString = new Date(item.submitted).toLocaleString();
const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO") const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO");
const { CONSTANTS } = useLocalStorage(); const { CONSTANTS } = useLocalStorage();
const chainInfo = useMemo(() => { const chainInfo = useMemo(() => {
@ -109,7 +109,7 @@ const HistoryItem = ({
flexDirection={isVerySmallScreen ? "row" : "row"} flexDirection={isVerySmallScreen ? "row" : "row"}
> >
<Box display="flex" gap="20px" p="10px 0"> <Box display="flex" gap="20px" p="10px 0">
<TokenStack chainTokenNames={[chainInfo.symbol]} tokens={["FTSO"]} /> <TokenStack chainTokenNames={[chainInfo.symbol]} tokens={[ftsoSymbol]} />
<Box display="flex" flexDirection="column"> <Box display="flex" flexDirection="column">
<Typography>{localString}</Typography> <Typography>{localString}</Typography>
<Link <Link
@ -141,7 +141,7 @@ const HistoryItem = ({
<TableRow> <TableRow>
<TableCell sx={{ padding: "10px 0" }}> <TableCell sx={{ padding: "10px 0" }}>
<Box display="flex" alignItems="center"> <Box display="flex" alignItems="center">
<TokenStack chainTokenNames={["ETH"]} tokens={["FTSO"]} /> <TokenStack chainTokenNames={["ETH"]} tokens={[ftsoSymbol]} />
<Box ml="10px" display="flex" flexDirection="column" alignItems="flex-start"> <Box ml="10px" display="flex" flexDirection="column" alignItems="flex-start">
<Typography>{item?.name ?? "Unknown"}{item?.isCustom ? " (Custom)" : ""}</Typography> <Typography>{item?.name ?? "Unknown"}{item?.isCustom ? " (Custom)" : ""}</Typography>
<Link <Link
@ -245,6 +245,7 @@ const HistoryList = ({ chainId, address, storedTransactions, historyType, config
key={i} key={i}
item={item} item={item}
config={config} config={config}
chainId={chainId}
currentTime={currentTime} currentTime={currentTime}
finalityDelay={finalityDelay} finalityDelay={finalityDelay}
eraseRecord={() => eraseRecord(i)} eraseRecord={() => eraseRecord(i)}