fixes for bridging animation

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2025-11-07 16:20:34 +03:00
parent 0925c79ff8
commit 338cd9626a
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
2 changed files with 9 additions and 6 deletions

View File

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

View File

@ -18,7 +18,8 @@ import {
import { ss58Decode, ss58Address } from "@polkadot-labs/hdkd-helpers";
import { toHex } from "@polkadot-api/utils";
import { decodeAddress } from "@polkadot/util-crypto";
import { useBlockNumber, useTransactionConfirmations } from "wagmi";
import { useTransactionConfirmations } from "wagmi";
import { getBlockNumber } from "@wagmi/core";
import { keccak256 } from "viem";
import { u64, u128 } from "scale-ts";
@ -78,6 +79,7 @@ const Bridge = ({ chainId, address, config, connect }) => {
const [convertedReceiver, setConvertedReceiver] = useState(undefined);
const [amount, setAmount] = useState("");
const [rotation, setRotation] = useState(0);
const [blockNumber, setBlockNumber] = useState(0);
const sliceString = (string, first, second) => {
return string.slice(0, first) + "..." + string.slice(second);
@ -147,7 +149,8 @@ const Bridge = ({ chainId, address, config, connect }) => {
const finalityDelay = Number(evmNetwork?.finality_delay ?? 0n);
const incomingFee = Number(evmNetwork?.incoming_fee ?? 0n) / 10000000;
const { data: blockNumber } = useBlockNumber({ watch: true });
getBlockNumber(config).then(block => setBlockNumber(block));
const { gatekeeperAddress } = useGatekeeperAddress(chainId);
const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST");
const {
@ -401,7 +404,7 @@ const Bridge = ({ chainId, address, config, connect }) => {
width: "35px",
height: "35px",
transition: "transform 0.7s ease-in-out",
transform: `rotateX(${rotation}deg)`
transform: `rotateX(${currentRecord.step == 1 ? rotation : 0}deg)`
}}
viewBox="0 0 25 25"
component={ThumbUpIcon}
@ -411,7 +414,7 @@ const Bridge = ({ chainId, address, config, connect }) => {
width: "35px",
height: "35px",
transition: "transform 0.7s ease-in-out",
transform: `rotateX(${rotation}deg)`
transform: `rotateX(${currentRecord.step == 1 ? rotation : 0}deg)`
}}
viewBox="0 0 25 25"
component={ThumbDownAltIcon}
@ -507,7 +510,7 @@ const Bridge = ({ chainId, address, config, connect }) => {
textOverflow: "ellipsis",
color: clapped
? theme.colors.primary[300]
: clapped
: disabled
? theme.colors.feedback.error
: theme.colors.gray[10]
}}