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:
parent
3c68811b85
commit
b125916ee5
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ghost-dao-interface",
|
||||
"private": true,
|
||||
"version": "0.8.32",
|
||||
"version": "0.8.33",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@ -13,6 +13,7 @@ import Token from "../../../components/Token/Token";
|
||||
import { PrimaryButton } from "../../../components/Button";
|
||||
|
||||
import { useBondInfo } from "../../../hooks/bonds";
|
||||
import { useTokenSymbol } from "../../../hooks/tokens";
|
||||
import { getTokenDecimals } from "../../../hooks/helpers";
|
||||
import { useLocalStorage } from "../../../hooks/localstorage";
|
||||
import { formatNumber, formatCurrency, shorten } from "../../../helpers";
|
||||
@ -45,6 +46,7 @@ const BondModalExodus = ({ chainId, address, isOpen, close, config, historyRecor
|
||||
if (historyRecord === null) return null;
|
||||
const { network } = useParams();
|
||||
const { CONSTANTS } = useLocalStorage();
|
||||
|
||||
const [copiedIndex, setCopiedIndex] = useState(null);
|
||||
|
||||
const copyToClipboard = (text, index) => {
|
||||
@ -63,6 +65,8 @@ const BondModalExodus = ({ chainId, address, isOpen, close, config, historyRecor
|
||||
};
|
||||
}, [config]);
|
||||
|
||||
const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO");
|
||||
|
||||
const { data: receipt, isLoading, error } = useTransactionReceipt({
|
||||
hash: historyRecord?.txHash,
|
||||
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">
|
||||
<Box display="flex" justifyContent="space-between" width="100%">
|
||||
<Typography>Exodus Reward</Typography>
|
||||
<Typography>{formatCurrency(stakedAmount, 5, "FTSO")}</Typography>
|
||||
<Typography>{formatCurrency(stakedAmount, 5, ftsoSymbol)}</Typography>
|
||||
</Box>
|
||||
|
||||
<Box display="flex" justifyContent="space-between" width="100%">
|
||||
|
||||
@ -241,7 +241,7 @@ const BridgeInModal = ({ chainId, isOpen, close, config, historyRecord }) => {
|
||||
|
||||
const rootIncluded = useMemo(() => {
|
||||
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]);
|
||||
|
||||
const weaverArgs = useMemo(() => {
|
||||
|
||||
@ -61,7 +61,7 @@ const HistoryItem = ({
|
||||
const isVerySmallScreen = useMediaQuery("(max-width: 450px)");
|
||||
|
||||
const localString = new Date(item.submitted).toLocaleString();
|
||||
const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO")
|
||||
const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO");
|
||||
const { CONSTANTS } = useLocalStorage();
|
||||
|
||||
const chainInfo = useMemo(() => {
|
||||
@ -109,7 +109,7 @@ const HistoryItem = ({
|
||||
flexDirection={isVerySmallScreen ? "row" : "row"}
|
||||
>
|
||||
<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">
|
||||
<Typography>{localString}</Typography>
|
||||
<Link
|
||||
@ -141,7 +141,7 @@ const HistoryItem = ({
|
||||
<TableRow>
|
||||
<TableCell sx={{ padding: "10px 0" }}>
|
||||
<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">
|
||||
<Typography>{item?.name ?? "Unknown"}{item?.isCustom ? " (Custom)" : ""}</Typography>
|
||||
<Link
|
||||
@ -245,6 +245,7 @@ const HistoryList = ({ chainId, address, storedTransactions, historyType, config
|
||||
key={i}
|
||||
item={item}
|
||||
config={config}
|
||||
chainId={chainId}
|
||||
currentTime={currentTime}
|
||||
finalityDelay={finalityDelay}
|
||||
eraseRecord={() => eraseRecord(i)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user