pretty
This commit is contained in:
parent
eb71c788ac
commit
f184ecb06b
@ -34,7 +34,10 @@ import {
|
|||||||
TalerErrorCode,
|
TalerErrorCode,
|
||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { TalerError } from "./errors.js";
|
import { TalerError } from "./errors.js";
|
||||||
import { HttpRequestLibrary, readSuccessResponseJsonOrThrow } from "./util/http.js";
|
import {
|
||||||
|
HttpRequestLibrary,
|
||||||
|
readSuccessResponseJsonOrThrow,
|
||||||
|
} from "./util/http.js";
|
||||||
|
|
||||||
const logger = new Logger("bank-api-client.ts");
|
const logger = new Logger("bank-api-client.ts");
|
||||||
|
|
||||||
|
@ -23,9 +23,7 @@ import {
|
|||||||
TalerCryptoInterfaceR,
|
TalerCryptoInterfaceR,
|
||||||
} from "../cryptoImplementation.js";
|
} from "../cryptoImplementation.js";
|
||||||
import { CryptoWorker } from "./cryptoWorkerInterface.js";
|
import { CryptoWorker } from "./cryptoWorkerInterface.js";
|
||||||
import {
|
import { processRequestWithImpl } from "./worker-common.js";
|
||||||
processRequestWithImpl,
|
|
||||||
} from "./worker-common.js";
|
|
||||||
|
|
||||||
const logger = new Logger("synchronousWorker.ts");
|
const logger = new Logger("synchronousWorker.ts");
|
||||||
|
|
||||||
@ -77,10 +75,7 @@ export class SynchronousCryptoWorker implements CryptoWorker {
|
|||||||
*/
|
*/
|
||||||
postMessage(msg: any): void {
|
postMessage(msg: any): void {
|
||||||
const handleRequest = async () => {
|
const handleRequest = async () => {
|
||||||
const responseMsg = await processRequestWithImpl(
|
const responseMsg = await processRequestWithImpl(msg, this.cryptoImplR);
|
||||||
msg,
|
|
||||||
this.cryptoImplR,
|
|
||||||
);
|
|
||||||
try {
|
try {
|
||||||
setTimeout(() => this.dispatchMessage(responseMsg), 0);
|
setTimeout(() => this.dispatchMessage(responseMsg), 0);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -50,9 +50,20 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js";
|
import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js";
|
||||||
import { DenominationRecord } from "./db.js";
|
import { DenominationRecord } from "./db.js";
|
||||||
import { BankAccessApi, BankApi, BankServiceHandle } from "./bank-api-client.js";
|
import {
|
||||||
import { HttpRequestLibrary, readSuccessResponseJsonOrThrow } from "./util/http.js";
|
BankAccessApi,
|
||||||
import { getBankStatusUrl, getBankWithdrawalInfo, isWithdrawableDenom } from "./operations/withdraw.js";
|
BankApi,
|
||||||
|
BankServiceHandle,
|
||||||
|
} from "./bank-api-client.js";
|
||||||
|
import {
|
||||||
|
HttpRequestLibrary,
|
||||||
|
readSuccessResponseJsonOrThrow,
|
||||||
|
} from "./util/http.js";
|
||||||
|
import {
|
||||||
|
getBankStatusUrl,
|
||||||
|
getBankWithdrawalInfo,
|
||||||
|
isWithdrawableDenom,
|
||||||
|
} from "./operations/withdraw.js";
|
||||||
import { ExchangeInfo } from "./operations/exchanges.js";
|
import { ExchangeInfo } from "./operations/exchanges.js";
|
||||||
import { assembleRefreshRevealRequest } from "./operations/refresh.js";
|
import { assembleRefreshRevealRequest } from "./operations/refresh.js";
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ export async function getMerchantInfo(
|
|||||||
return existingInfo;
|
return existingInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
const configUrl = new URL("config", canonBaseUrl);
|
const configUrl = new URL("config", canonBaseUrl);
|
||||||
const resp = await ws.http.get(configUrl.href);
|
const resp = await ws.http.get(configUrl.href);
|
||||||
|
|
||||||
const configResp = await readSuccessResponseJsonOrThrow(
|
const configResp = await readSuccessResponseJsonOrThrow(
|
||||||
|
@ -1796,7 +1796,6 @@ export async function processPurchase(
|
|||||||
return processPurchaseQueryRefund(ws, proposalId, options);
|
return processPurchaseQueryRefund(ws, proposalId, options);
|
||||||
case PurchaseStatus.ProposalDownloadFailed:
|
case PurchaseStatus.ProposalDownloadFailed:
|
||||||
case PurchaseStatus.Paid:
|
case PurchaseStatus.Paid:
|
||||||
case PurchaseStatus.AbortingWithRefund:
|
|
||||||
case PurchaseStatus.RepurchaseDetected:
|
case PurchaseStatus.RepurchaseDetected:
|
||||||
return {
|
return {
|
||||||
type: OperationAttemptResultType.Finished,
|
type: OperationAttemptResultType.Finished,
|
||||||
|
Loading…
Reference in New Issue
Block a user