mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-13 05:31:01 +00:00
fix: wait 12s before auto-verify to allow block inclusion
TX was not yet included in a block when verify fired immediately after signing, causing first attempt to always fail. Block time on Asset Hub is ~12s, so delay the verify call accordingly.
This commit is contained in:
@@ -154,8 +154,8 @@ export function DepositModal({ isOpen, onClose, onSuccess }: DepositModalProps)
|
|||||||
}
|
}
|
||||||
setStep('verifying');
|
setStep('verifying');
|
||||||
toast.success(t('p2pDeposit.txSent'));
|
toast.success(t('p2pDeposit.txSent'));
|
||||||
// Auto-verify immediately — fire and forget
|
// Wait for TX to be included in a block before verifying (~12s block time)
|
||||||
handleVerifyDeposit(hash, blockNum);
|
setTimeout(() => handleVerifyDeposit(hash, blockNum), 12000);
|
||||||
}
|
}
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
console.error('Deposit transaction error:', error);
|
console.error('Deposit transaction error:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user