mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 02:07:55 +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');
|
||||
toast.success(t('p2pDeposit.txSent'));
|
||||
// Auto-verify immediately — fire and forget
|
||||
handleVerifyDeposit(hash, blockNum);
|
||||
// Wait for TX to be included in a block before verifying (~12s block time)
|
||||
setTimeout(() => handleVerifyDeposit(hash, blockNum), 12000);
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
console.error('Deposit transaction error:', error);
|
||||
|
||||
Reference in New Issue
Block a user