Skip to content

Commit

Permalink
chore: remove some todos
Browse files Browse the repository at this point in the history
  • Loading branch information
oderayi committed Dec 18, 2024
1 parent 42f5a01 commit 6884886
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 34 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ services:
volumes:
# override the default values with our own - this is because the KAFKA_HOST env variable is ignored for some reason
- ./docker/ml-api-adapter/default.json:/opt/app/config/default.json
# TODO: we should be able to remove this - I think the image command is broken
command:
- "node"
- "src/api/index.js"
Expand Down
2 changes: 0 additions & 2 deletions scripts/_wait4_all.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ async function updateServiceStatus (waitingMap) {
const startingServices = getServicesForStatus(waitingMap, 'starting')

Promise.all(startingServices.map(async serviceName => {
// TODO: This info may be useful in future!
// const currentStatus = waitingMap[serviceName]
const progress = await getProgress(serviceName)
waitingMap[serviceName] = progress
}))
Expand Down
1 change: 0 additions & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const HEADERS = Object.freeze({
fspiopSignature: 'FSPIOP-Signature',
fspiopUri: 'FSPIOP-URI'
})
// todo: think, if it's better to use all headers keys in lowercase

const ERROR_MESSAGES = {
CALLBACK_UNSUCCESSFUL_HTTP_RESPONSE: 'Got non-success response sending error callback',
Expand Down
3 changes: 0 additions & 3 deletions src/lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ const { getStackOrInspect } = require('../lib/util')
axios.defaults.httpAgent = new http.Agent({ keepAlive: true })
axios.defaults.httpAgent.toJSON = () => ({})

// TODO: where httpRequest is called, there's a pretty common pattern of obtaining an endpoint from
// the database, specialising a template string with that endpoint, then calling httpRequest. Is
// there common functionality in these places than can reasonably be factored out?
/**
* Encapsulates making an HTTP request and translating any error response into a domain-specific
* error type.
Expand Down
1 change: 0 additions & 1 deletion src/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ function generateRequestHeadersForJWS (
const ret = Object.fromEntries(
Object.entries(mappedHeaders).map(([key, value]) => [key.toLowerCase(), value])
)
// todo: clarify if we need additionalHeaders here (see generateRequestHeaders fn)

return removeEmptyKeys(ret)
}
Expand Down
1 change: 0 additions & 1 deletion src/model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const QuotesModel = require('./quotes')
const BulkQuotesModel = require('./bulkQuotes')
const FxQuotesModel = require('./fxQuotes')

// todo: get models only through these factories
module.exports = (db, proxyClient) => ({
quotesModelFactory: (requestId) => new QuotesModel({ db, requestId, proxyClient }),
bulkQuotesModelFactory: (requestId) => new BulkQuotesModel({ db, requestId, proxyClient }),
Expand Down
12 changes: 0 additions & 12 deletions src/model/quotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,22 +666,10 @@ class QuotesModel {
txn, quoteUpdateRequest.extensionList.extension, quoteId, null, refs.quoteResponseId)
}

// todo: create any additional quoteParties e.g. for fees, comission etc...

await txn.commit()
this.writeLog(`create quote update transaction committed to db: ${util.inspect(refs)}`)

/// if we got here, all entities have been created in db correctly to record the quote request

// check quote response rules
// let test = { ...quoteUpdateRequest };

// const failures = await quoteRules.getFailures(test);
// if (failures && failures.length > 0) {
// quote broke business rules, queue up an error callback to the caller
// this.writeLog(`Rules failed for quoteId ${refs.quoteId}: ${util.inspect(failures)}`);
// todo: make error callback
// }
}
// if we got here rules passed, so we can forward the quote on to the recipient dfsp
const childSpan = handleQuoteUpdateSpan.getChild('qs_quote_forwardQuoteUpdate')
Expand Down
13 changes: 0 additions & 13 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,6 @@ const initServer = async function (config, topicNames) {
ops: {
interval: 1000
}
// TODO: hapi good is deprecated per https://www.npmjs.com/package/@hapi/good/v/9.0.1 and is
// suggesting we consider another plugin from https://hapi.dev/plugins/#logging
// reporters: {
// console: [{
// module: 'good-squeeze',
// name: 'Squeeze',
// args: [{ log: '*', response: '*' }]
// }, {
// module: 'good-console',
// args: [{ format: '' }]
// }, 'stdout']
// }
}
},
{
Expand All @@ -171,7 +159,6 @@ const initServer = async function (config, topicNames) {
])

server.route(Routes.APIRoutes(api))
// TODO: follow instructions https://github.com/anttiviljami/openapi-backend/blob/master/DOCS.md#postresponsehandler-handler

// start the server
await server.start()
Expand Down

0 comments on commit 6884886

Please sign in to comment.