From 037372d610d020e91b64e805a063d359ffc5771c Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 3 Nov 2022 17:19:17 -0500 Subject: [PATCH 1/3] fix: correct internal/external bulk quote convert function --- modules/api-svc/src/lib/model/lib/shared.js | 19 ++++--------------- package.json | 2 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/modules/api-svc/src/lib/model/lib/shared.js b/modules/api-svc/src/lib/model/lib/shared.js index 6975bfcf5..1f81c4bb0 100644 --- a/modules/api-svc/src/lib/model/lib/shared.js +++ b/modules/api-svc/src/lib/model/lib/shared.js @@ -324,24 +324,13 @@ const mojaloopBulkQuotesRequestToInternal = (external) => { amountType: quote.amountType, amount: quote.amount.amount, currency: quote.amount.currency, + feesAmount: quote.fees.amount, + feesCurrency: quote.fees.currency, transactionType: quote.transactionType.scenario, initiator: quote.transactionType.initiator, - initiatorType: quote.transactionType.initiatorType + initiatorType: quote.transactionType.initiatorType, + note: quote.note }; - - if (quote.fees) { - internal.feesAmount = quote.fees.amount; - internal.feesCurrency = quote.fees.currency; - } - - if (quote.geoCode) { - internal.geoCode = quote.geoCode; - } - - if (quote.note) { - internal.note = quote.note; - } - return internalQuote; }); diff --git a/package.json b/package.json index d778238f2..8b208bc83 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "wait-4-docker": "node ./scripts/_wait4_all.js" }, "dependencies": { - "nx": "15.0.6", + "nx": "15.0.8", "tslib": "^2.4.1" }, "devDependencies": { From b6c091b156a7a15bfc1b0aea8e3994d4957e4f0e Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 3 Nov 2022 17:27:07 -0500 Subject: [PATCH 2/3] chore: lock --- yarn.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/yarn.lock b/yarn.lock index fde2153a5..a12062eb7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2413,7 +2413,7 @@ __metadata: jest: ^29.2.2 nodemon: ^2.0.20 npm-check-updates: ^16.3.16 - nx: 15.0.6 + nx: 15.0.8 replace: ^1.2.2 standard-version: ^9.5.0 ts-jest: ^29.0.3 @@ -2561,23 +2561,23 @@ __metadata: languageName: node linkType: hard -"@nrwl/cli@npm:15.0.6": - version: 15.0.6 - resolution: "@nrwl/cli@npm:15.0.6" +"@nrwl/cli@npm:15.0.8": + version: 15.0.8 + resolution: "@nrwl/cli@npm:15.0.8" dependencies: - nx: 15.0.6 - checksum: 1e7b5dd00abad1d5090c99edd9e52672cc3568b932e30334b6ee3a7d04ad262b09e7ef64ba343ee8939c9203ef57abb979fe3ce493836162af786555f28b23e8 + nx: 15.0.8 + checksum: 0db02cc5650d57e376ac67e1987f50ef403a8b560e03b23944e10fc3d79a69fd36f193cc1f88c8a5e2545f10e2ae7b8a5ededba0f184cc797b1ecc6123992a5a languageName: node linkType: hard -"@nrwl/tao@npm:15.0.6": - version: 15.0.6 - resolution: "@nrwl/tao@npm:15.0.6" +"@nrwl/tao@npm:15.0.8": + version: 15.0.8 + resolution: "@nrwl/tao@npm:15.0.8" dependencies: - nx: 15.0.6 + nx: 15.0.8 bin: tao: index.js - checksum: eca13fd091f9de4a2b31a1db2505af5b7f2e232f9e02d1933e161215dae8fc02efb5c2b894badba6a074fa0fe927877e55eb6da81b99a462c422010f181943ef + checksum: d43032334c35ff14796e35a66ebc66c62ce925a2ca5ef490b3e421c6183561a5ebfaee7e1898f051e9ae4db0f56f2ed4c1996ac68bafdd84918e1a1d22f8cfe4 languageName: node linkType: hard @@ -10667,12 +10667,12 @@ __metadata: languageName: node linkType: hard -"nx@npm:15.0.6": - version: 15.0.6 - resolution: "nx@npm:15.0.6" +"nx@npm:15.0.8": + version: 15.0.8 + resolution: "nx@npm:15.0.8" dependencies: - "@nrwl/cli": 15.0.6 - "@nrwl/tao": 15.0.6 + "@nrwl/cli": 15.0.8 + "@nrwl/tao": 15.0.8 "@parcel/watcher": 2.0.4 "@yarnpkg/lockfile": ^1.1.0 "@yarnpkg/parsers": ^3.0.0-rc.18 @@ -10716,7 +10716,7 @@ __metadata: optional: true bin: nx: bin/nx.js - checksum: b34fd275570360b9314affc1ab48b586083ca866e5c9ba66738932491c7fc5c3126b62266433639cdb73bf4ca328d01e898198bca55d08e766bb223cc51abba2 + checksum: 20ac28d36e3a84ec89eb6d645e8dfcf251539dd943f8e077046f9ae270fc5432dad354594f0ed59d720e01320d446dbba00fcd5c3746edbf0c1247ed5f65390b languageName: node linkType: hard From fec5fb5d2a5604699a0f301022595dbc8c65aaa7 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 3 Nov 2022 17:58:54 -0500 Subject: [PATCH 3/3] chore: fix --- modules/api-svc/src/lib/model/lib/shared.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/api-svc/src/lib/model/lib/shared.js b/modules/api-svc/src/lib/model/lib/shared.js index 1f81c4bb0..b110cae31 100644 --- a/modules/api-svc/src/lib/model/lib/shared.js +++ b/modules/api-svc/src/lib/model/lib/shared.js @@ -324,13 +324,20 @@ const mojaloopBulkQuotesRequestToInternal = (external) => { amountType: quote.amountType, amount: quote.amount.amount, currency: quote.amount.currency, - feesAmount: quote.fees.amount, - feesCurrency: quote.fees.currency, transactionType: quote.transactionType.scenario, initiator: quote.transactionType.initiator, - initiatorType: quote.transactionType.initiatorType, - note: quote.note + initiatorType: quote.transactionType.initiatorType }; + + if (quote.fees) { + internalQuote.feesAmount = quote.fees.amount; + internalQuote.feesCurrency = quote.fees.currency; + } + + if (quote.note) { + internalQuote.note = quote.note; + } + return internalQuote; });