-fix harness type errors
This commit is contained in:
parent
e81ae0f3e5
commit
e331012c9f
@ -18,6 +18,7 @@
|
||||
"scripts": {
|
||||
"compile": "./build.mjs",
|
||||
"check": "tsc",
|
||||
"test": "tsc",
|
||||
"clean": "rimraf lib dist tsconfig.tsbuildinfo",
|
||||
"pretty": "prettier --write src"
|
||||
},
|
||||
@ -42,4 +43,4 @@
|
||||
"axios": "^0.27.2",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,13 +86,17 @@ export async function runBench1(configJson: any): Promise<void> {
|
||||
// No persistent DB storage.
|
||||
persistentStoragePath: undefined,
|
||||
httpLib: myHttpLib,
|
||||
config: {
|
||||
testing: {
|
||||
insecureTrustExchange: trustExchange,
|
||||
},
|
||||
features: {
|
||||
batchWithdrawal,
|
||||
}
|
||||
}
|
||||
});
|
||||
wallet = res.wallet;
|
||||
getDbStats = res.getDbStats;
|
||||
if (trustExchange) {
|
||||
wallet.setInsecureTrustExchange();
|
||||
}
|
||||
wallet.setBatchWithdrawal(batchWithdrawal);
|
||||
await wallet.client.call(WalletApiOperation.InitWallet, {});
|
||||
}
|
||||
|
||||
|
@ -94,13 +94,17 @@ export async function runBench3(configJson: any): Promise<void> {
|
||||
// No persistent DB storage.
|
||||
persistentStoragePath: undefined,
|
||||
httpLib: myHttpLib,
|
||||
config: {
|
||||
features: {
|
||||
batchWithdrawal: batchWithdrawal,
|
||||
},
|
||||
testing: {
|
||||
insecureTrustExchange: trustExchange,
|
||||
},
|
||||
},
|
||||
});
|
||||
wallet = res.wallet;
|
||||
getDbStats = res.getDbStats;
|
||||
if (trustExchange) {
|
||||
wallet.setInsecureTrustExchange();
|
||||
}
|
||||
wallet.setBatchWithdrawal(batchWithdrawal);
|
||||
await wallet.client.call(WalletApiOperation.InitWallet, {});
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
*/
|
||||
import { AbsoluteTime, Duration } from "@gnu-taler/taler-util";
|
||||
import {
|
||||
getDefaultNodeWallet2,
|
||||
WalletApiOperation,
|
||||
} from "@gnu-taler/taler-wallet-core";
|
||||
import { defaultCoinConfig } from "../harness/denomStructures.js";
|
||||
@ -27,7 +26,6 @@ import { GlobalTestState, WalletCli } from "../harness/harness.js";
|
||||
import {
|
||||
createSimpleTestkudosEnvironment,
|
||||
withdrawViaBank,
|
||||
makeTestPayment,
|
||||
} from "../harness/helpers.js";
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,6 @@ export async function runForcedSelectionTest(t: GlobalTestState) {
|
||||
await wallet.client.call(WalletApiOperation.WithdrawTestBalance, {
|
||||
exchangeBaseUrl: exchange.baseUrl,
|
||||
amount: "TESTKUDOS:10",
|
||||
bankBaseUrl: bank.baseUrl,
|
||||
bankAccessApiBaseUrl: bank.bankAccessApiBaseUrl,
|
||||
forcedDenomSel: {
|
||||
denoms: [
|
||||
|
@ -120,7 +120,6 @@ export async function runWallettestingTest(t: GlobalTestState) {
|
||||
await wallet.client.call(WalletApiOperation.RunIntegrationTest, {
|
||||
amountToSpend: "TESTKUDOS:5",
|
||||
amountToWithdraw: "TESTKUDOS:10",
|
||||
bankBaseUrl: bank.baseUrl,
|
||||
bankAccessApiBaseUrl: bank.bankAccessApiBaseUrl,
|
||||
exchangeBaseUrl: exchange.baseUrl,
|
||||
merchantAuthToken: merchantAuthToken,
|
||||
@ -144,7 +143,6 @@ export async function runWallettestingTest(t: GlobalTestState) {
|
||||
|
||||
await wallet.client.call(WalletApiOperation.WithdrawTestBalance, {
|
||||
amount: "TESTKUDOS:10",
|
||||
bankBaseUrl: bank.baseUrl,
|
||||
bankAccessApiBaseUrl: bank.bankAccessApiBaseUrl,
|
||||
exchangeBaseUrl: exchange.baseUrl,
|
||||
});
|
||||
@ -170,7 +168,6 @@ export async function runWallettestingTest(t: GlobalTestState) {
|
||||
|
||||
await wallet.client.call(WalletApiOperation.WithdrawTestBalance, {
|
||||
amount: "TESTKUDOS:10",
|
||||
bankBaseUrl: bank.baseUrl,
|
||||
bankAccessApiBaseUrl: bank.bankAccessApiBaseUrl,
|
||||
exchangeBaseUrl: exchange.baseUrl,
|
||||
});
|
||||
|
@ -57,6 +57,9 @@ export interface BankAccountBalanceResponse {
|
||||
}
|
||||
|
||||
export interface BankServiceHandle {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
readonly baseUrl: string;
|
||||
readonly bankAccessApiBaseUrl: string;
|
||||
readonly http: HttpRequestLibrary;
|
||||
|
@ -205,11 +205,16 @@ export async function withdrawCoin(args: {
|
||||
};
|
||||
}
|
||||
|
||||
export interface FindDenomOptions {
|
||||
denomselAllowLate?: boolean;
|
||||
}
|
||||
|
||||
export function findDenomOrThrow(
|
||||
denomselAllowLate: boolean,
|
||||
exchangeInfo: ExchangeInfo,
|
||||
amount: AmountString,
|
||||
options: FindDenomOptions = {},
|
||||
): DenominationRecord {
|
||||
const denomselAllowLate = options.denomselAllowLate ?? false;
|
||||
for (const d of exchangeInfo.keys.currentDenominations) {
|
||||
const value: AmountJson = {
|
||||
currency: d.currency,
|
||||
|
Loading…
Reference in New Issue
Block a user