feat(web3): ready to withdraw toast - build spec fixes

This commit is contained in:
asiaznik
2023-06-22 10:31:54 +02:00
parent 5b75e98080
commit ebe05e874b
@@ -82,16 +82,19 @@ export const useVerifyWithdrawal = () => {
if (threshold && amount.isGreaterThan(threshold)) {
const delaySecs = await getDelay();
const completeTimestamp =
new Date(withdrawal.createdTimestamp).getTime() + delaySecs * 1000;
if (delaySecs != null) {
const completeTimestamp =
new Date(withdrawal.createdTimestamp).getTime() +
delaySecs * 1000;
if (Date.now() < completeTimestamp) {
setState({
status: ApprovalStatus.Delayed,
threshold,
completeTimestamp,
});
return false;
if (Date.now() < completeTimestamp) {
setState({
status: ApprovalStatus.Delayed,
threshold,
completeTimestamp,
});
return false;
}
}
}