diff --git a/src/identity/derived-key-utils.ts b/src/identity/derived-key-utils.ts index 2d8895a..c3720d0 100644 --- a/src/identity/derived-key-utils.ts +++ b/src/identity/derived-key-utils.ts @@ -23,9 +23,9 @@ export async function generateDerivedKeyPayload( ) { const { BlockHeight } = await getAppState(); - // days * (24 hours / day) * (60 minutes / hour) * (1 block / 5 minutes) = blocks + // days * (24 hours / day) * (60 minutes / hour) * (60 seconds / minute) * (1 block / 1 second) = blocks const expirationBlockHeight = - BlockHeight + (numDaysBeforeExpiration * 24 * 60) / 5; + BlockHeight + numDaysBeforeExpiration * 24 * 60 * 60; const ownerPublicKeyBase58 = publicKeyToBase58Check(ownerKeys.public, { network, }); diff --git a/src/identity/identity.spec.ts b/src/identity/identity.spec.ts index 73414d4..77cc22a 100644 --- a/src/identity/identity.spec.ts +++ b/src/identity/identity.spec.ts @@ -1008,7 +1008,7 @@ describe('identity', () => { }); describe('loginWithAutoDerive()', () => { it('it stores the expected derive data when generating a local derived key payload', async () => { - const expectedExpirationBlock = 1294652; + const expectedExpirationBlock = 315603452; const expectedDerivePayload = { derivedPublicKeyBase58Check: 'BC1YLhKdgXgrZ1XkCzbmP6T9bumth2DgPwNjMksCAXe5kGU9LnxQtsX',