From dc97525de68e0562c9f94692982ad1d3c77fb677 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 15 Dec 2019 17:21:23 +0000 Subject: [PATCH] fix(core): update --- package-lock.json | 95 +++++++++++++++++----------------- package.json | 8 +-- test/test.ts | 2 +- ts/bunq.classes.account.ts | 5 +- ts/bunq.classes.transaction.ts | 2 +- 5 files changed, 57 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index 63772e9..0c8602d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,17 +70,17 @@ } }, "@gitzone/tstest": { - "version": "1.0.24", - "resolved": "https://verdaccio.lossless.one/@gitzone%2ftstest/-/tstest-1.0.24.tgz", - "integrity": "sha512-HFHLxhXFhhY7nn7H7dxfjy/6WiUGCw35L5Do/ZajCAn/xAWiqnppW1aIp0LOOaWeZ7J5fH7xP88TjsGpwR+MRA==", + "version": "1.0.28", + "resolved": "https://verdaccio.lossless.one/@gitzone%2ftstest/-/tstest-1.0.28.tgz", + "integrity": "sha512-MNXH4hpn/4BRwoCjIxz+fbrpkFw/u8834BFTX4Ug1bU37qBZvwZdyMfHBNRSjDykya3SLjOSqOf1mcMI3gnEvA==", "dev": true, "requires": { - "@gitzone/tsrun": "^1.2.6", + "@gitzone/tsrun": "^1.2.8", "@pushrocks/consolecolor": "^2.0.1", - "@pushrocks/smartfile": "^7.0.2", + "@pushrocks/smartfile": "^7.0.6", "@pushrocks/smartlog": "^2.0.19", - "@pushrocks/smartpromise": "^3.0.2", - "@pushrocks/smartshell": "^2.0.22", + "@pushrocks/smartpromise": "^3.0.6", + "@pushrocks/smartshell": "^2.0.25", "@types/figures": "^3.0.1", "figures": "^3.0.0" } @@ -347,21 +347,22 @@ } }, "@pushrocks/tapbundle": { - "version": "3.0.13", - "resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.0.13.tgz", - "integrity": "sha512-23O4UMBafCuD+RnUlXNvtT9DGbL1HMD+xZE1Zcr7Ll7WvgxUgRQQfk9kq6qbLLbjaRe1J2Ijsgh1HuZbBaucLQ==", + "version": "3.2.0", + "resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.0.tgz", + "integrity": "sha512-xnKIGe7NJqxWBaFeKIEXShDjV2wap1XJqmlp3m1MKqmIF62vRpZnkzpyE1ZAoNwiYQmIsXIpvP/PDv+iPevPfw==", "dev": true, "requires": { "@pushrocks/early": "^3.0.3", "@pushrocks/smartdelay": "^2.0.3", + "@pushrocks/smartfile": "^7.0.6", "@pushrocks/smartpromise": "^3.0.2", "smartchai": "^2.0.1" } }, "@types/chai": { - "version": "4.2.3", - "resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.3.tgz", - "integrity": "sha512-VRw2xEGbll3ZiTQ4J02/hUjNqZoue1bMhoo2dgM2LXjDdyaq4q80HgBDHwpI0/VKlo4Eg+BavyQMv/NYgTetzA==", + "version": "4.2.7", + "resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.7.tgz", + "integrity": "sha512-luq8meHGYwvky0O7u0eQZdA7B4Wd9owUCqvbw2m3XCrCU8mplYOujMBbvyS547AxJkC+pGnd0Cm15eNxEUNU8g==", "dev": true }, "@types/chai-as-promised": { @@ -435,9 +436,9 @@ "dev": true }, "@types/node": { - "version": "10.14.19", - "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-10.14.19.tgz", - "integrity": "sha512-j6Sqt38ssdMKutXBUuAcmWF8QtHW1Fwz/mz4Y+Wd9mzpBiVFirjpNQf363hG5itkG+yGaD+oiLyb50HxJ36l9Q==" + "version": "12.12.17", + "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.12.17.tgz", + "integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==" }, "@types/node-forge": { "version": "0.8.6", @@ -456,9 +457,9 @@ } }, "@types/which": { - "version": "1.3.1", - "resolved": "https://verdaccio.lossless.one/@types%2fwhich/-/which-1.3.1.tgz", - "integrity": "sha512-ZrJDWpvg75LTGX4XwuneY9s6bF3OeZcGTpoGh3zDV9ytzcHMFsRrMIaLBRJZQMBoGyKs6unBQfVdrLZiYfb1zQ==", + "version": "1.3.2", + "resolved": "https://verdaccio.lossless.one/@types%2fwhich/-/which-1.3.2.tgz", + "integrity": "sha512-8oDqyLC7eD4HM307boe2QWKyuzdzWBj56xI/imSl2cpL+U3tCMaTAkMJ4ee5JBZ/FsOJlvRGeIShiZDAl1qERA==", "dev": true }, "@types/yargs": { @@ -522,9 +523,9 @@ } }, "arg": { - "version": "4.1.1", - "resolved": "https://verdaccio.lossless.one/arg/-/arg-4.1.1.tgz", - "integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==", + "version": "4.1.2", + "resolved": "https://verdaccio.lossless.one/arg/-/arg-4.1.2.tgz", + "integrity": "sha512-+ytCkGcBtHZ3V2r2Z06AncYO8jz46UEamcspGoU8lHcEbpn6J77QK0vdWvChsclg/tM5XIJC5tnjmPp7Eq6Obg==", "dev": true }, "argparse": { @@ -664,6 +665,12 @@ "wrap-ansi": "^2.0.0" } }, + "clone": { + "version": "1.0.4", + "resolved": "https://verdaccio.lossless.one/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, "code-point-at": { "version": "1.1.0", "resolved": "https://verdaccio.lossless.one/code-point-at/-/code-point-at-1.1.0.tgz", @@ -694,9 +701,9 @@ } }, "commander": { - "version": "2.20.0", - "resolved": "https://verdaccio.lossless.one/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "version": "2.20.3", + "resolved": "https://verdaccio.lossless.one/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, "concat-map": { @@ -756,14 +763,6 @@ "dev": true, "requires": { "clone": "^1.0.2" - }, - "dependencies": { - "clone": { - "version": "1.0.4", - "resolved": "https://verdaccio.lossless.one/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - } } }, "delayed-stream": { @@ -842,9 +841,9 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "figures": { - "version": "3.0.0", - "resolved": "https://verdaccio.lossless.one/figures/-/figures-3.0.0.tgz", - "integrity": "sha512-HKri+WoWoUgr83pehn/SIgLOMZ9nAWC6dcGj26RY2R4F50u4+RTUz0RCrUlOV3nKRAICW1UGzyb+kcX2qK1S/g==", + "version": "3.1.0", + "resolved": "https://verdaccio.lossless.one/figures/-/figures-3.1.0.tgz", + "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" @@ -1356,9 +1355,9 @@ "dev": true }, "resolve": { - "version": "1.12.0", - "resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "version": "1.13.1", + "resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.13.1.tgz", + "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -1465,9 +1464,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.13", - "resolved": "https://verdaccio.lossless.one/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "version": "0.5.16", + "resolved": "https://verdaccio.lossless.one/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1541,9 +1540,9 @@ } }, "ts-node": { - "version": "8.4.1", - "resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-8.4.1.tgz", - "integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==", + "version": "8.5.4", + "resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-8.5.4.tgz", + "integrity": "sha512-izbVCRV68EasEPQ8MSIGBNK9dc/4sYJJKYA+IarMQct1RtEot6Xp0bXuClsbUSnKpg50ho+aOAx8en5c+y4OFw==", "dev": true, "requires": { "arg": "^4.1.0", @@ -1560,9 +1559,9 @@ "dev": true }, "tslint": { - "version": "5.20.0", - "resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.20.0.tgz", - "integrity": "sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g==", + "version": "5.20.1", + "resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.20.1.tgz", + "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", diff --git a/package.json b/package.json index 0631a75..f4ce387 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,11 @@ }, "devDependencies": { "@gitzone/tsbuild": "^2.0.22", - "@gitzone/tstest": "^1.0.15", + "@gitzone/tstest": "^1.0.28", "@pushrocks/qenv": "^4.0.6", - "@pushrocks/tapbundle": "^3.0.7", - "@types/node": "^10.11.7", - "tslint": "^5.11.0", + "@pushrocks/tapbundle": "^3.2.0", + "@types/node": "^12.12.17", + "tslint": "^5.20.1", "tslint-config-prettier": "^1.15.0" }, "dependencies": { diff --git a/test/test.ts b/test/test.ts index bb277b7..26fcf70 100644 --- a/test/test.ts +++ b/test/test.ts @@ -9,7 +9,7 @@ let testBunqAccount: bunq.BunqAccount; const testBunqOptions: bunq.IBunqConstructorOptions = { apiKey: testQenv.getEnvVarOnDemand('BUNQ_APIKEY'), deviceName: 'mojoiobunqpackage', - environment: 'SANDBOX' + environment: 'PRODUCTION' }; tap.test('should create a valid bunq account', async () => { diff --git a/ts/bunq.classes.account.ts b/ts/bunq.classes.account.ts index a716b29..c0c92c1 100644 --- a/ts/bunq.classes.account.ts +++ b/ts/bunq.classes.account.ts @@ -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; } } diff --git a/ts/bunq.classes.transaction.ts b/ts/bunq.classes.transaction.ts index 743cdd5..ecfe0bf 100644 --- a/ts/bunq.classes.transaction.ts +++ b/ts/bunq.classes.transaction.ts @@ -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; }