fix(core): update

This commit is contained in:
2019-12-15 17:21:23 +00:00
parent eeb93ef969
commit dc97525de6
5 changed files with 57 additions and 55 deletions

View File

@@ -89,10 +89,13 @@ export class BunqAccount {
return accountsArray;
}
/**
* stops the instance
*/
public async stop() {
if (this.bunqJSClient) {
this.bunqJSClient.setKeepAlive(false);
this.bunqJSClient.destroyApiSession();
await this.bunqJSClient.destroyApiSession();
this.bunqJSClient = null;
}
}

View File

@@ -4,7 +4,7 @@ import { MonetaryAccount } from './bunq.classes.monetaryaccount';
export class Transaction {
public static fromApiObject(monetaryAccountRefArg: MonetaryAccount, apiObjectArg: any) {
const newTransaction = new this(monetaryAccountRefArg);
Object.assign(newTransaction, apiObjectArg);
Object.assign(newTransaction, apiObjectArg.Payment);
return newTransaction;
}