Compare commits

...

2 Commits

Author SHA1 Message Date
419cbde251
store expected session index not current
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2026-01-30 15:35:06 +03:00
4ffa0f4b17
session overlap aware fix
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2026-01-30 15:21:09 +03:00
2 changed files with 14 additions and 3 deletions

View File

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

View File

@ -129,10 +129,18 @@ const Bridge = ({ chainId, address, config, connect }) => {
});
const blockCommitments = useBlockCommitments({ evmChainId: chainId });
const disabledValidators = useDisabledValidators();
const transactionApplaused = useApplauseDetails({
const transactionApplausedDirect = useApplauseDetails({
currentSession: watchTransaction?.sessionIndex ?? currentSession,
argsHash: hashedArguments
});
const transactionApplausedIncremented = useApplauseDetails({
currentSession: watchTransaction ? watchTransaction.sessionIndex + 1 : undefined,
argsHash: hashedArguments
});
const transactionApplaused = useMemo(() => {
return transactionApplausedDirect || transactionApplausedIncremented;
}, [transactionApplausedDirect, transactionApplausedIncremented])
const finalityDelay = Number(evmNetwork?.finality_delay ?? 0n);
@ -272,8 +280,11 @@ const Bridge = ({ chainId, address, config, connect }) => {
}
const storeTransactionHash = (txHash, receiver, amount) => {
const expectedSessionIndex = (currentSession ?? 0) + (evmNetwork
? Number((evmNetwork.avg_block_speed * evmNetwork.finality_delay) / (1000n * 14400n))
: 0);
const transaction = {
sessionIndex: currentSession ?? 0,
sessionIndex: expectedSessionIndex,
transactionHash: txHash,
receiverAddress: receiver,
amount: amount,