Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/identity/derived-key-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
2 changes: 1 addition & 1 deletion src/identity/identity.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down