New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mojaloop/account-lookup-bc-client-lib

Package Overview
Dependencies
Maintainers
5
Versions
223
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mojaloop/account-lookup-bc-client-lib - npm Package Compare versions

Comparing version 0.1.24 to 0.1.25

4

dist/account_lookup_http_client.d.ts

@@ -37,7 +37,5 @@ /*****

private readonly _baseUrlHttpService;
private readonly _cache;
private readonly _cacheTimeoutMs;
private readonly _requestTimeoutMs;
constructor(logger: ILogger, baseUrlHttpService: string, authRequester: IAuthenticatedHttpRequester, cacheTimeoutMs?: number, requestTimeoutMs?: number);
constructor(logger: ILogger, baseUrlHttpService: string, authRequester: IAuthenticatedHttpRequester, requestTimeoutMs?: number);
participantLookUp(partyType: string, partyId: string, currency: string | null): Promise<string | null>;
}

@@ -35,6 +35,4 @@ /*****

const errors_1 = require("./errors");
const account_lookup_bc_implementations_lib_1 = require("@mojaloop/account-lookup-bc-implementations-lib");
const SERVICE_BASE_PATH = "/account-lookup";
const DEFAULT_REQUEST_TIMEOUT_MS = 5000;
const DEFAULT_CACHE_TIMEOUT_MS = 1 * 60 * 1000;
class AccountLookupHttpClient {

@@ -44,12 +42,8 @@ _logger;

_baseUrlHttpService;
_cache;
_cacheTimeoutMs;
_requestTimeoutMs;
constructor(logger, baseUrlHttpService, authRequester, cacheTimeoutMs = DEFAULT_CACHE_TIMEOUT_MS, requestTimeoutMs = DEFAULT_REQUEST_TIMEOUT_MS) {
constructor(logger, baseUrlHttpService, authRequester, requestTimeoutMs = DEFAULT_REQUEST_TIMEOUT_MS) {
this._logger = logger;
this._baseUrlHttpService = baseUrlHttpService;
this._authRequester = authRequester;
this._cacheTimeoutMs = cacheTimeoutMs;
this._requestTimeoutMs = requestTimeoutMs;
this._cache = new account_lookup_bc_implementations_lib_1.LocalCache(this._logger, this._cacheTimeoutMs);
}

@@ -64,8 +58,4 @@ async participantLookUp(partyType, partyId, currency) {

}
const cached = this._cache.get(partyId, partyType, currency);
if (cached) {
return cached.toString();
}
const url = new URL(urlBuilder, this._baseUrlHttpService).toString();
const resp = await this._authRequester.fetch(url, DEFAULT_REQUEST_TIMEOUT_MS)
const resp = await this._authRequester.fetch(url, this._requestTimeoutMs)
.catch((err) => {

@@ -81,3 +71,2 @@ console.log(err);

});
this._cache.set(data, partyId, partyType, currency);
return data;

@@ -84,0 +73,0 @@ }

{
"name": "@mojaloop/account-lookup-bc-client-lib",
"version": "0.1.24",
"version": "0.1.25",
"description": "Account Lookup BC - Clients",

@@ -38,4 +38,3 @@ "license": "Apache-2.0",

"@mojaloop/logging-bc-client-lib": "^0.1.24",
"@mojaloop/security-bc-client-lib": "0.1.31",
"@mojaloop/account-lookup-bc-implementations-lib": "*"
"@mojaloop/security-bc-client-lib": "0.1.31"
},

@@ -42,0 +41,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc