Skip to content

Commit bae00ad

Browse files
committed
Update computation of expiration block height
1 parent 1e4c26b commit bae00ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/account.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ export class AccountService {
351351
const btcDepositAddress = 'Not implemented yet';
352352
const ethDepositAddress = 'Not implemented yet';
353353

354-
// days * (24 hours / day) * (60 minutes / hour) * (1 block / 5 minutes) = blocks
355-
const numBlocksBeforeExpiration = (numDaysBeforeExpiration * 24 * 60) / 5;
354+
// days * (24 hours / day) * (60 minutes / hour) * (60 seconds / minute) * (1 block / second) = blocks
355+
const numBlocksBeforeExpiration = (numDaysBeforeExpiration * 24 * 60 * 60);
356356

357357
// By default, we authorize this derived key for 8640 blocks, which is about 30 days.
358358
const expirationBlock = blockHeight + numBlocksBeforeExpiration;

0 commit comments

Comments
 (0)