aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMS <ms@taler.net>2021-02-03 14:35:29 +0100
committerMS <ms@taler.net>2021-02-03 14:35:29 +0100
commita98a7cd0517fec269e4720756226ef6226216264 (patch)
tree2e66cc6914db828484f596a6e66a113c412e25ba
parenta3b84dca53dc78ee8db1353d828898c6aa07be9a (diff)
prettified sources
-rw-r--r--packages/taler-wallet-cli/src/index.ts5
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/merchantApiTypes.ts16
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-deposit.ts7
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts12
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts6
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts11
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts5
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts6
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts5
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/testrunner.ts7
10 files changed, 49 insertions, 31 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index e97e8de86..5e0d72208 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -45,7 +45,10 @@ import { getTestInfo, runTests } from "./integrationtests/testrunner";
// This module also serves as the entry point for the crypto
// thread worker, and thus must expose these two handlers.
-export { handleWorkerError, handleWorkerMessage } from "@gnu-taler/taler-wallet-core";
+export {
+ handleWorkerError,
+ handleWorkerMessage,
+} from "@gnu-taler/taler-wallet-core";
const logger = new Logger("taler-wallet-cli.ts");
diff --git a/packages/taler-wallet-cli/src/integrationtests/merchantApiTypes.ts b/packages/taler-wallet-cli/src/integrationtests/merchantApiTypes.ts
index 85a3106c1..a6356b317 100644
--- a/packages/taler-wallet-cli/src/integrationtests/merchantApiTypes.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/merchantApiTypes.ts
@@ -78,9 +78,7 @@ export const codecForPostOrderResponse = (): Codec<PostOrderResponse> =>
.property("token", codecOptional(codecForString()))
.build("PostOrderResponse");
-export const codecForCheckPaymentPaidResponse = (): Codec<
- CheckPaymentPaidResponse
-> =>
+export const codecForCheckPaymentPaidResponse = (): Codec<CheckPaymentPaidResponse> =>
buildCodecForObject<CheckPaymentPaidResponse>()
.property("order_status_url", codecForString())
.property("order_status", codecForConstString("paid"))
@@ -97,9 +95,7 @@ export const codecForCheckPaymentPaidResponse = (): Codec<
.property("refund_details", codecForAny())
.build("CheckPaymentPaidResponse");
-export const codecForCheckPaymentUnpaidResponse = (): Codec<
- CheckPaymentUnpaidResponse
-> =>
+export const codecForCheckPaymentUnpaidResponse = (): Codec<CheckPaymentUnpaidResponse> =>
buildCodecForObject<CheckPaymentUnpaidResponse>()
.property("order_status", codecForConstString("unpaid"))
.property("taler_pay_uri", codecForString())
@@ -107,17 +103,13 @@ export const codecForCheckPaymentUnpaidResponse = (): Codec<
.property("already_paid_order_id", codecOptional(codecForString()))
.build("CheckPaymentPaidResponse");
-export const codecForCheckPaymentClaimedResponse = (): Codec<
- CheckPaymentClaimedResponse
-> =>
+export const codecForCheckPaymentClaimedResponse = (): Codec<CheckPaymentClaimedResponse> =>
buildCodecForObject<CheckPaymentClaimedResponse>()
.property("order_status", codecForConstString("claimed"))
.property("contract_terms", codecForContractTerms())
.build("CheckPaymentClaimedResponse");
-export const codecForMerchantOrderPrivateStatusResponse = (): Codec<
- MerchantOrderPrivateStatusResponse
-> =>
+export const codecForMerchantOrderPrivateStatusResponse = (): Codec<MerchantOrderPrivateStatusResponse> =>
buildCodecForUnion<MerchantOrderPrivateStatusResponse>()
.discriminateOn("order_status")
.alternative("paid", codecForCheckPaymentPaidResponse())
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-deposit.ts b/packages/taler-wallet-cli/src/integrationtests/test-deposit.ts
index 3e59a6cce..905cf8af5 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-deposit.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-deposit.ts
@@ -18,10 +18,7 @@
* Imports.
*/
import { GlobalTestState } from "./harness";
-import {
- createSimpleTestkudosEnvironment,
- withdrawViaBank,
-} from "./helpers";
+import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers";
/**
* Run test for basic, bank-integrated withdrawal and payment.
@@ -59,7 +56,7 @@ export async function runDepositTest(t: GlobalTestState) {
const trackResult = wallet.trackDepositGroup({
depositGroupId,
- })
+ });
console.log(JSON.stringify(trackResult, undefined, 2));
}
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts
index 44cdf6c03..609ec596f 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts
@@ -148,23 +148,23 @@ export async function createLibeufinTestEnvironment(
await LibeufinNexusApi.postPermission(libeufinNexus, {
action: "grant",
permission: {
- subjectType: "user",
+ subjectType: "user",
subjectId: "twguser",
resourceType: "facade",
resourceId: "twg1",
- permissionName: "facade.talerWireGateway.history"
- }
+ permissionName: "facade.talerWireGateway.history",
+ },
});
await LibeufinNexusApi.postPermission(libeufinNexus, {
action: "grant",
permission: {
- subjectType: "user",
+ subjectType: "user",
subjectId: "twguser",
resourceType: "facade",
resourceId: "twg1",
- permissionName: "facade.talerWireGateway.transfer"
- }
+ permissionName: "facade.talerWireGateway.transfer",
+ },
});
const exchange = ExchangeService.create(t, {
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts
index d33597859..07ed56397 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts
@@ -30,7 +30,11 @@ import {
withdrawViaBank,
SimpleTestEnvironment,
} from "./helpers";
-import { durationFromSpec, PreparePayResultType, URL } from "@gnu-taler/taler-wallet-core";
+import {
+ durationFromSpec,
+ PreparePayResultType,
+ URL,
+} from "@gnu-taler/taler-wallet-core";
import axios from "axios";
async function testRefundApiWithFulfillmentUrl(
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts b/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts
index 7102c11c6..90a0edf09 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts
@@ -22,8 +22,15 @@
/**
* Imports.
*/
-import { PreparePayResultType, TalerErrorCode, URL } from "@gnu-taler/taler-wallet-core";
-import { FaultInjectionRequestContext, FaultInjectionResponseContext } from "./faultInjection";
+import {
+ PreparePayResultType,
+ TalerErrorCode,
+ URL,
+} from "@gnu-taler/taler-wallet-core";
+import {
+ FaultInjectionRequestContext,
+ FaultInjectionResponseContext,
+} from "./faultInjection";
import { GlobalTestState, MerchantPrivateApi, setupDb } from "./harness";
import {
createFaultInjectedMerchantTestkudosEnvironment,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts
index 173fdfa33..2432c1118 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts
@@ -19,7 +19,10 @@
*/
import { GlobalTestState, MerchantPrivateApi, WalletCli } from "./harness";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers";
-import { PreparePayResultType, TalerErrorCode } from "@gnu-taler/taler-wallet-core";
+import {
+ PreparePayResultType,
+ TalerErrorCode,
+} from "@gnu-taler/taler-wallet-core";
/**
* Run test for basic, bank-integrated withdrawal.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts b/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts
index 1595c8b80..69d503269 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts
@@ -19,7 +19,11 @@
*/
import { GlobalTestState, delayMs, MerchantPrivateApi } from "./harness";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers";
-import { TransactionType, Amounts, durationFromSpec } from "@gnu-taler/taler-wallet-core";
+import {
+ TransactionType,
+ Amounts,
+ durationFromSpec,
+} from "@gnu-taler/taler-wallet-core";
/**
* Run test for basic, bank-integrated withdrawal.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts
index d579ee11a..861e616e6 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts
@@ -19,7 +19,10 @@
*/
import { GlobalTestState, BankApi, BankAccessApi } from "./harness";
import { createSimpleTestkudosEnvironment } from "./helpers";
-import { codecForBalancesResponse, TalerErrorCode } from "@gnu-taler/taler-wallet-core";
+import {
+ codecForBalancesResponse,
+ TalerErrorCode,
+} from "@gnu-taler/taler-wallet-core";
/**
* Run test for basic, bank-integrated withdrawal.
diff --git a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
index dd2cb69be..e820ac25a 100644
--- a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
@@ -14,7 +14,12 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { GlobalTestState, runTestWithState, shouldLingerInTest, TestRunResult } from "./harness";
+import {
+ GlobalTestState,
+ runTestWithState,
+ shouldLingerInTest,
+ TestRunResult,
+} from "./harness";
import { runPaymentTest } from "./test-payment";
import * as fs from "fs";
import * as path from "path";