fixes for bridging animation
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
0925c79ff8
commit
338cd9626a
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ghost-dao-interface",
|
"name": "ghost-dao-interface",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.3.5",
|
"version": "0.3.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -18,7 +18,8 @@ import {
|
|||||||
import { ss58Decode, ss58Address } from "@polkadot-labs/hdkd-helpers";
|
import { ss58Decode, ss58Address } from "@polkadot-labs/hdkd-helpers";
|
||||||
import { toHex } from "@polkadot-api/utils";
|
import { toHex } from "@polkadot-api/utils";
|
||||||
import { decodeAddress } from "@polkadot/util-crypto";
|
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 { keccak256 } from "viem";
|
||||||
import { u64, u128 } from "scale-ts";
|
import { u64, u128 } from "scale-ts";
|
||||||
|
|
||||||
@ -78,6 +79,7 @@ const Bridge = ({ chainId, address, config, connect }) => {
|
|||||||
const [convertedReceiver, setConvertedReceiver] = useState(undefined);
|
const [convertedReceiver, setConvertedReceiver] = useState(undefined);
|
||||||
const [amount, setAmount] = useState("");
|
const [amount, setAmount] = useState("");
|
||||||
const [rotation, setRotation] = useState(0);
|
const [rotation, setRotation] = useState(0);
|
||||||
|
const [blockNumber, setBlockNumber] = useState(0);
|
||||||
|
|
||||||
const sliceString = (string, first, second) => {
|
const sliceString = (string, first, second) => {
|
||||||
return string.slice(0, first) + "..." + string.slice(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 finalityDelay = Number(evmNetwork?.finality_delay ?? 0n);
|
||||||
const incomingFee = Number(evmNetwork?.incoming_fee ?? 0n) / 10000000;
|
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 { gatekeeperAddress } = useGatekeeperAddress(chainId);
|
||||||
const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST");
|
const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST");
|
||||||
const {
|
const {
|
||||||
@ -401,7 +404,7 @@ const Bridge = ({ chainId, address, config, connect }) => {
|
|||||||
width: "35px",
|
width: "35px",
|
||||||
height: "35px",
|
height: "35px",
|
||||||
transition: "transform 0.7s ease-in-out",
|
transition: "transform 0.7s ease-in-out",
|
||||||
transform: `rotateX(${rotation}deg)`
|
transform: `rotateX(${currentRecord.step == 1 ? rotation : 0}deg)`
|
||||||
}}
|
}}
|
||||||
viewBox="0 0 25 25"
|
viewBox="0 0 25 25"
|
||||||
component={ThumbUpIcon}
|
component={ThumbUpIcon}
|
||||||
@ -411,7 +414,7 @@ const Bridge = ({ chainId, address, config, connect }) => {
|
|||||||
width: "35px",
|
width: "35px",
|
||||||
height: "35px",
|
height: "35px",
|
||||||
transition: "transform 0.7s ease-in-out",
|
transition: "transform 0.7s ease-in-out",
|
||||||
transform: `rotateX(${rotation}deg)`
|
transform: `rotateX(${currentRecord.step == 1 ? rotation : 0}deg)`
|
||||||
}}
|
}}
|
||||||
viewBox="0 0 25 25"
|
viewBox="0 0 25 25"
|
||||||
component={ThumbDownAltIcon}
|
component={ThumbDownAltIcon}
|
||||||
@ -507,7 +510,7 @@ const Bridge = ({ chainId, address, config, connect }) => {
|
|||||||
textOverflow: "ellipsis",
|
textOverflow: "ellipsis",
|
||||||
color: clapped
|
color: clapped
|
||||||
? theme.colors.primary[300]
|
? theme.colors.primary[300]
|
||||||
: clapped
|
: disabled
|
||||||
? theme.colors.feedback.error
|
? theme.colors.feedback.error
|
||||||
: theme.colors.gray[10]
|
: theme.colors.gray[10]
|
||||||
}}
|
}}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user