summaryrefslogtreecommitdiff
path: root/packages/taler-util/src/http-client/bank-core.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-03-08 15:36:50 -0300
committerSebastian <sebasjm@gmail.com>2024-03-08 15:39:59 -0300
commite92440e257b4df4a232a28701143a4f9db730458 (patch)
tree85c8bc084cf0089de9b7034de6f9db82d58e308e /packages/taler-util/src/http-client/bank-core.ts
parent8dea5ac8f41e1d17163a08ba203f15ec372cd442 (diff)
downloadwallet-core-e92440e257b4df4a232a28701143a4f9db730458.tar.gz
wallet-core-e92440e257b4df4a232a28701143a4f9db730458.tar.bz2
wallet-core-e92440e257b4df4a232a28701143a4f9db730458.zip
fix #8489
Diffstat (limited to 'packages/taler-util/src/http-client/bank-core.ts')
-rw-r--r--packages/taler-util/src/http-client/bank-core.ts48
1 files changed, 20 insertions, 28 deletions
diff --git a/packages/taler-util/src/http-client/bank-core.ts b/packages/taler-util/src/http-client/bank-core.ts
index 4131edb11..b9fd6da80 100644
--- a/packages/taler-util/src/http-client/bank-core.ts
+++ b/packages/taler-util/src/http-client/bank-core.ts
@@ -86,16 +86,16 @@ export enum TalerCoreBankCacheEviction {
CREATE_WITHDRAWAL,
CREATE_CASHOUT,
}
- /**
- * Protocol version spoken with the core bank.
- *
- * Endpoint must be ordered in the same way that in the docs
- * Response code (http and taler) must have the same order that in the docs
- * That way is easier to see changes
- *
- * Uses libtool's current:revision:age versioning.
- */
- export class TalerCoreBankHttpClient {
+/**
+ * Protocol version spoken with the core bank.
+ *
+ * Endpoint must be ordered in the same way that in the docs
+ * Response code (http and taler) must have the same order that in the docs
+ * That way is easier to see changes
+ *
+ * Uses libtool's current:revision:age versioning.
+ */
+export class TalerCoreBankHttpClient {
public readonly PROTOCOL_VERSION = "4:0:0";
httpLib: HttpRequestLibrary;
@@ -960,47 +960,39 @@ export enum TalerCoreBankCacheEviction {
* https://docs.taler.net/core/api-corebank.html#taler-bank-integration-api
*
*/
- getIntegrationAPI(): string {
- return new URL(`taler-integration/`, this.baseUrl).href;
- // return new TalerBankIntegrationHttpClient(url.href, this.httpLib);
+ getIntegrationAPI(): URL {
+ return new URL(`taler-integration/`, this.baseUrl);
}
/**
* https://docs.taler.net/core/api-corebank.html#taler-bank-integration-api
*
*/
- getWireGatewayAPI(username: string): string {
- return new URL(
- `accounts/${username}/taler-wire-gateway/`,
- this.baseUrl,
- ).href;
- // return new TalerWireGatewayHttpClient(url.href, username, this.httpLib);
+ getWireGatewayAPI(username: string): URL {
+ return new URL(`accounts/${username}/taler-wire-gateway/`, this.baseUrl);
}
/**
* https://docs.taler.net/core/api-corebank.html#taler-bank-integration-api
*
*/
- getRevenueAPI(username: string): string {
- return new URL(`accounts/${username}/taler-revenue/`, this.baseUrl).href;
- // return new TalerRevenueHttpClient(url.href, username, this.httpLib);
+ getRevenueAPI(username: string): URL {
+ return new URL(`accounts/${username}/taler-revenue/`, this.baseUrl);
}
/**
* https://docs.taler.net/core/api-corebank.html#post--accounts-$USERNAME-token
*
*/
- getAuthenticationAPI(username: string): string {
- return new URL(`accounts/${username}/`, this.baseUrl).href;
- // return new TalerAuthenticationHttpClient(url.href, username, this.httpLib);
+ getAuthenticationAPI(username: string): URL {
+ return new URL(`accounts/${username}/`, this.baseUrl);
}
/**
* https://docs.taler.net/core/api-corebank.html#post--accounts-$USERNAME-token
*
*/
- getConversionInfoAPI(): string {
- return new URL(`conversion-info/`, this.baseUrl).href;
- // TalerBankConversionHttpClient
+ getConversionInfoAPI(): URL {
+ return new URL(`conversion-info/`, this.baseUrl);
}
}