From b0e7da9f86457abc9a74d813d1ce4c9b05777d10 Mon Sep 17 00:00:00 2001 From: Uncle Fatso Date: Tue, 11 Nov 2025 18:46:54 +0300 Subject: [PATCH] possibility to self applause for frozen transactions in registry Signed-off-by: Uncle Fatso --- package.json | 2 +- src/containers/Bridge/Bridge.jsx | 44 ++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 622d4da..864953e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ghost-dao-interface", "private": true, - "version": "0.3.6", + "version": "0.3.7", "type": "module", "scripts": { "dev": "vite", diff --git a/src/containers/Bridge/Bridge.jsx b/src/containers/Bridge/Bridge.jsx index e04996e..c9d9c01 100644 --- a/src/containers/Bridge/Bridge.jsx +++ b/src/containers/Bridge/Bridge.jsx @@ -86,17 +86,6 @@ const Bridge = ({ chainId, address, config, connect }) => { } const initialStoredTransactions = localStorage.getItem(STORAGE_PREFIX); - // const initialStoredTransactions = JSON.stringify([ - // { - // sessionIndex: 124, - // transactionHash: "0x637276eccfa0787de396877a1a259964334fb52cb5111ea84bb28f0006f06276", - // receiverAddress: "sfK147dy2NapxEKwrTLLxTkmhw15kkoJeEKrg77oLFRmUQZDb", - // amount: "10000000000000000000", - // chainId: 11155111, - // blockNumber: 9033063, - // timestamp: Date.now() - // } - // ]); const [storedTransactions, setStoredTransactions] = useState( initialStoredTransactions ? JSON.parse(initialStoredTransactions) : [] ); @@ -248,6 +237,20 @@ const Bridge = ({ chainId, address, config, connect }) => { return storedTransactions.filter(obj => obj.chainId === chainId); }, [storedTransactions, chainId]); + const selfApplauseUrl = useMemo(() => { + if (!currentRecord) return ''; + + const amount = new DecimalBigNumber(BigInt(currentRecord.amount), 18).toString(); + let url = "https://lite.ghostchain.io/#/applause?"; + url += `networkId=${chainId}&`; + url += `sessionIndex=${currentRecord.sessionIndex}&`; + url += `amount=${amount}&`; + url += `receiver=${currentRecord.receiverAddress}&`; + url += `transactionHash=${currentRecord.transactionHash}`; + + return url; + }, [currentRecord]); + const removeStoredRecord = useCallback(() => { const newStoredTransactions = storedTransactions.filter((_, index) => index !== activeTxIndex) setStoredTransactions(newStoredTransactions); @@ -472,6 +475,25 @@ const Bridge = ({ chainId, address, config, connect }) => { + {(currentRecord?.step ?? 0) < 3 && currentSession > (currentRecord?.sessionIndex ?? 0) + 2 && + + window.open( + selfApplauseUrl, + '_blank', + 'noopener,noreferrer' + )} + > + Self Applause + + + + Your transaction seems to be stuck, possibly because of a problem with some inactive validators on the network. + + + } +