update
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import * as plugins from './bunq.plugins.js';
|
||||
import { BunqHttpClient } from './bunq.classes.httpclient.js';
|
||||
import { BunqCrypto } from './bunq.classes.crypto.js';
|
||||
import {
|
||||
import type {
|
||||
IBunqApiContext,
|
||||
IBunqInstallationResponse,
|
||||
IBunqDeviceServerResponse,
|
||||
@@ -39,7 +39,9 @@ export class BunqSession {
|
||||
*/
|
||||
private async createInstallation(): Promise<void> {
|
||||
// Generate RSA key pair if not already generated
|
||||
if (!this.crypto.getPublicKey()) {
|
||||
try {
|
||||
this.crypto.getPublicKey();
|
||||
} catch (error) {
|
||||
await this.crypto.generateKeyPair();
|
||||
}
|
||||
|
||||
@@ -143,7 +145,7 @@ export class BunqSession {
|
||||
}
|
||||
|
||||
const now = new plugins.smarttime.TimeStamp();
|
||||
return this.sessionExpiryTime.isYoungerThanOtherTimeStamp(now);
|
||||
return now.isOlderThan(this.sessionExpiryTime);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user