From 57a488a1f6d810e4f56da3b419150cc5ff770d11 Mon Sep 17 00:00:00 2001 From: Lazy Nina <81658138+lazynina@users.noreply.github.com> Date: Tue, 13 Feb 2024 09:27:56 -0500 Subject: [PATCH] Update computation of expiration block height (#300) * PoS Spending Limits UI * Update computation of expiration block height --- src/app/account.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/account.service.ts b/src/app/account.service.ts index 84d5b8b8..bd9e5e69 100644 --- a/src/app/account.service.ts +++ b/src/app/account.service.ts @@ -351,8 +351,8 @@ export class AccountService { const btcDepositAddress = 'Not implemented yet'; const ethDepositAddress = 'Not implemented yet'; - // days * (24 hours / day) * (60 minutes / hour) * (1 block / 5 minutes) = blocks - const numBlocksBeforeExpiration = (numDaysBeforeExpiration * 24 * 60) / 5; + // days * (24 hours / day) * (60 minutes / hour) * (60 seconds / minute) * (1 block / second) = blocks + const numBlocksBeforeExpiration = numDaysBeforeExpiration * 24 * 60 * 60; // By default, we authorize this derived key for 8640 blocks, which is about 30 days. const expirationBlock = blockHeight + numBlocksBeforeExpiration;