aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-11-01 17:52:51 +0100
committerFlorian Dold <florian@dold.me>2022-11-01 17:52:51 +0100
commitaab3f917c42c9c38b0d13b69380075e5a0505720 (patch)
treeca150783ed6d0dccdb0bbfcb9a20c0285269f237 /packages
parent504d9f09b433cec44b7992b8d8d7255760d86aa4 (diff)
-harness fixes for kyc
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-util/src/backup-types.ts1
-rw-r--r--packages/taler-util/src/taler-types.ts17
-rw-r--r--packages/taler-util/src/wallet-types.ts1
-rw-r--r--packages/taler-wallet-cli/src/harness/harness.ts28
-rw-r--r--packages/taler-wallet-core/src/crypto/cryptoImplementation.ts2
-rw-r--r--packages/taler-wallet-core/src/db.ts2
-rw-r--r--packages/taler-wallet-core/src/operations/backup/export.ts1
-rw-r--r--packages/taler-wallet-core/src/operations/backup/import.ts1
-rw-r--r--packages/taler-wallet-core/src/operations/exchanges.ts1
9 files changed, 15 insertions, 39 deletions
diff --git a/packages/taler-util/src/backup-types.ts b/packages/taler-util/src/backup-types.ts
index 6c9c7b424..71f5bd04e 100644
--- a/packages/taler-util/src/backup-types.ts
+++ b/packages/taler-util/src/backup-types.ts
@@ -1104,7 +1104,6 @@ export interface BackupExchangeGlobalFees {
purseFee: BackupAmountString;
historyTimeout: TalerProtocolDuration;
- kycTimeout: TalerProtocolDuration;
purseTimeout: TalerProtocolDuration;
purseLimit: number;
diff --git a/packages/taler-util/src/taler-types.ts b/packages/taler-util/src/taler-types.ts
index 134f59836..d4f96f5cd 100644
--- a/packages/taler-util/src/taler-types.ts
+++ b/packages/taler-util/src/taler-types.ts
@@ -772,11 +772,6 @@ export interface GlobalFees {
// What date (exclusive) does this fees stop going into effect?
end_date: TalerProtocolTimestamp;
- // KYC fee, charged when a user wants to create an account.
- // The first year of the account_annual_fee after the KYC is
- // always included.
- kyc_fee: AmountString;
-
// Account history fee, charged when a user wants to
// obtain a reserve/account history.
history_fee: AmountString;
@@ -798,13 +793,6 @@ export interface GlobalFees {
// retain the account history for legal reasons until this time.
history_expiration: TalerProtocolDuration;
- // How long does the exchange promise to keep funds
- // an account for which the KYC has never happened
- // after a purse was merged into an account? Basically,
- // after this time funds in an account without KYC are
- // forfeit.
- account_kyc_timeout: TalerProtocolDuration;
-
// Non-negative number of concurrent purses that any
// account holder is allowed to create without having
// to pay the purse_fee.
@@ -828,8 +816,6 @@ export class WireFeesJson {
*/
wire_fee: string;
- wad_fee: string;
-
/**
* Cost of clising a reserve.
*/
@@ -1395,12 +1381,10 @@ export const codecForGlobalFees = (): Codec<GlobalFees> =>
buildCodecForObject<GlobalFees>()
.property("start_date", codecForTimestamp)
.property("end_date", codecForTimestamp)
- .property("kyc_fee", codecForAmountString())
.property("history_fee", codecForAmountString())
.property("account_fee", codecForAmountString())
.property("purse_fee", codecForAmountString())
.property("history_expiration", codecForDuration)
- .property("account_kyc_timeout", codecForDuration)
.property("purse_account_limit", codecForNumber())
.property("purse_timeout", codecForDuration)
.property("master_sig", codecForString())
@@ -1423,7 +1407,6 @@ export const codecForWireFeesJson = (): Codec<WireFeesJson> =>
buildCodecForObject<WireFeesJson>()
.property("wire_fee", codecForString())
.property("closing_fee", codecForString())
- .property("wad_fee", codecForString())
.property("sig", codecForString())
.property("start_date", codecForTimestamp)
.property("end_date", codecForTimestamp)
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index fc173f1e9..9d95f1ee2 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -766,7 +766,6 @@ export interface ExchangeGlobalFees {
purseFee: AmountJson;
historyTimeout: TalerProtocolDuration;
- kycTimeout: TalerProtocolDuration;
purseTimeout: TalerProtocolDuration;
purseLimit: number;
diff --git a/packages/taler-wallet-cli/src/harness/harness.ts b/packages/taler-wallet-cli/src/harness/harness.ts
index 26ced4334..6f722dc8d 100644
--- a/packages/taler-wallet-cli/src/harness/harness.ts
+++ b/packages/taler-wallet-cli/src/harness/harness.ts
@@ -486,7 +486,7 @@ class BankServiceBase {
protected globalTestState: GlobalTestState,
protected bankConfig: BankConfig,
protected configFile: string,
- ) { }
+ ) {}
}
/**
@@ -780,7 +780,8 @@ class LibEuFinBankService extends BankServiceBase implements BankServiceHandle {
*/
export class FakebankService
extends BankServiceBase
- implements BankServiceHandle {
+ implements BankServiceHandle
+{
proc: ProcessWrapper | undefined;
http = new NodeHttpLib();
@@ -1131,7 +1132,7 @@ export class ExchangeService implements ExchangeServiceInterface {
private exchangeConfig: ExchangeConfig,
private configFilename: string,
private keyPair: EddsaKeyPair,
- ) { }
+ ) {}
get name() {
return this.exchangeConfig.name;
@@ -1228,11 +1229,14 @@ export class ExchangeService implements ExchangeServiceInterface {
"-c",
this.configFilename,
"wire-fee",
+ // Year
`${i}`,
+ // Wire method
accTargetType,
+ // Wire fee
`${this.exchangeConfig.currency}:0.01`,
- `${this.exchangeConfig.currency}:0.01`,
- `${this.exchangeConfig.currency}:0.01`,
+ // Closing fee
+ `${this.exchangeConfig.currency}:0.01`,
"upload",
],
);
@@ -1251,16 +1255,12 @@ export class ExchangeService implements ExchangeServiceInterface {
"now",
// history fee
`${this.exchangeConfig.currency}:0.01`,
- // kyc fee
- `${this.exchangeConfig.currency}:0.01`,
// account fee
`${this.exchangeConfig.currency}:0.01`,
// purse fee
`${this.exchangeConfig.currency}:0.00`,
// purse timeout
"1h",
- // kyc timeout
- "1h",
// history expiration
"1year",
// free purses per account
@@ -1384,7 +1384,7 @@ export class MerchantApiClient {
constructor(
private baseUrl: string,
public readonly auth: MerchantAuthConfiguration,
- ) { }
+ ) {}
async changeAuth(auth: MerchantAuthConfiguration): Promise<void> {
const url = new URL("private/auth", this.baseUrl);
@@ -1577,7 +1577,7 @@ export class MerchantService implements MerchantServiceInterface {
private globalState: GlobalTestState,
private merchantConfig: MerchantConfig,
private configFilename: string,
- ) { }
+ ) {}
private currentTimetravel: Duration | undefined;
@@ -1899,8 +1899,10 @@ export class WalletCli {
const resp = await sh(
self.globalTestState,
`wallet-${self.name}`,
- `taler-wallet-cli ${self.timetravelArg ?? ""
- } ${cryptoWorkerArg} --no-throttle -LTRACE --skip-defaults --wallet-db '${self.dbfile
+ `taler-wallet-cli ${
+ self.timetravelArg ?? ""
+ } ${cryptoWorkerArg} --no-throttle -LTRACE --skip-defaults --wallet-db '${
+ self.dbfile
}' api '${op}' ${shellWrap(JSON.stringify(payload))}`,
);
logger.info("--- wallet core response ---");
diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
index 593574eb7..8ba7d9298 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
@@ -914,10 +914,8 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
.put(timestampRoundedToBuffer(gf.start_date))
.put(timestampRoundedToBuffer(gf.end_date))
.put(durationRoundedToBuffer(gf.purse_timeout))
- .put(durationRoundedToBuffer(gf.account_kyc_timeout))
.put(durationRoundedToBuffer(gf.history_expiration))
.put(amountToBuffer(Amounts.parseOrThrow(gf.history_fee)))
- .put(amountToBuffer(Amounts.parseOrThrow(gf.kyc_fee)))
.put(amountToBuffer(Amounts.parseOrThrow(gf.account_fee)))
.put(amountToBuffer(Amounts.parseOrThrow(gf.purse_fee)))
.put(bufferForUint32(gf.purse_account_limit))
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
index b68da8333..307f76f21 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -452,8 +452,6 @@ export interface ExchangeDetailsRecord {
/**
* Fees for exchange services
- *
- * FIXME: Put in separate object store!
*/
globalFees: ExchangeGlobalFees[];
diff --git a/packages/taler-wallet-core/src/operations/backup/export.ts b/packages/taler-wallet-core/src/operations/backup/export.ts
index b344aa362..b33d2f11a 100644
--- a/packages/taler-wallet-core/src/operations/backup/export.ts
+++ b/packages/taler-wallet-core/src/operations/backup/export.ts
@@ -363,7 +363,6 @@ export async function exportBackup(
accountFee: Amounts.stringify(x.accountFee),
historyFee: Amounts.stringify(x.historyFee),
purseFee: Amounts.stringify(x.purseFee),
- kycTimeout: x.kycTimeout,
endDate: x.endDate,
historyTimeout: x.historyTimeout,
signature: x.signature,
diff --git a/packages/taler-wallet-core/src/operations/backup/import.ts b/packages/taler-wallet-core/src/operations/backup/import.ts
index 187acc5d4..73ad1ecc6 100644
--- a/packages/taler-wallet-core/src/operations/backup/import.ts
+++ b/packages/taler-wallet-core/src/operations/backup/import.ts
@@ -414,7 +414,6 @@ export async function importBackup(
accountFee: Amounts.parseOrThrow(x.accountFee),
historyFee: Amounts.parseOrThrow(x.historyFee),
purseFee: Amounts.parseOrThrow(x.purseFee),
- kycTimeout: x.kycTimeout,
endDate: x.endDate,
historyTimeout: x.historyTimeout,
signature: x.signature,
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts
index 8e68074d5..41e63b956 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -326,7 +326,6 @@ async function validateGlobalFees(
endDate: gf.end_date,
signature: gf.master_sig,
historyTimeout: gf.history_expiration,
- kycTimeout: gf.account_kyc_timeout,
purseLimit: gf.purse_account_limit,
purseTimeout: gf.purse_timeout,
});