cleanup / formatting
This commit is contained in:
parent
d43313f71e
commit
f5a8ae33e3
@ -76,8 +76,8 @@ export async function delayMs(ms: number): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface WithAuthorization {
|
export interface WithAuthorization {
|
||||||
Authorization?: string,
|
Authorization?: string;
|
||||||
} ;
|
}
|
||||||
|
|
||||||
interface WaitResult {
|
interface WaitResult {
|
||||||
code: number | null;
|
code: number | null;
|
||||||
@ -1220,7 +1220,9 @@ export namespace MerchantPrivateApi {
|
|||||||
): Promise<PostOrderResponse> {
|
): Promise<PostOrderResponse> {
|
||||||
const baseUrl = merchantService.makeInstanceBaseUrl(instanceName);
|
const baseUrl = merchantService.makeInstanceBaseUrl(instanceName);
|
||||||
let url = new URL("private/orders", baseUrl);
|
let url = new URL("private/orders", baseUrl);
|
||||||
const resp = await axios.post(url.href, req, { headers: withAuthorization });
|
const resp = await axios.post(url.href, req, {
|
||||||
|
headers: withAuthorization,
|
||||||
|
});
|
||||||
return codecForPostOrderResponse().decode(resp.data);
|
return codecForPostOrderResponse().decode(resp.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1395,10 +1397,8 @@ export class MerchantService implements MerchantServiceInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async start(
|
async start(): Promise<void> {
|
||||||
withResetTables: boolean = true, // eventually, this should become a named parameter
|
await exec(`taler-merchant-dbinit -c "${this.configFilename}"`);
|
||||||
): Promise<void> {
|
|
||||||
await exec(`taler-merchant-dbinit ${withResetTables ? "-r" : ""} -c "${this.configFilename}"`);
|
|
||||||
|
|
||||||
this.proc = this.globalState.spawnService(
|
this.proc = this.globalState.spawnService(
|
||||||
"taler-merchant-httpd",
|
"taler-merchant-httpd",
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
/**
|
/**
|
||||||
* Imports.
|
* Imports.
|
||||||
*/
|
*/
|
||||||
import axios from "axios";
|
|
||||||
import { URL } from "@gnu-taler/taler-util";
|
import { URL } from "@gnu-taler/taler-util";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import * as util from "util";
|
import * as util from "util";
|
||||||
|
@ -53,7 +53,7 @@ async function revokeAllWalletCoins(req: {
|
|||||||
await exchange.keyup();
|
await exchange.keyup();
|
||||||
await delayMs(1000);
|
await delayMs(1000);
|
||||||
await merchant.stop();
|
await merchant.stop();
|
||||||
await merchant.start(false); // 'false' prevents DB reset
|
await merchant.start();
|
||||||
await merchant.pingUntilAvailable();
|
await merchant.pingUntilAvailable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ export async function runTippingTest(t: GlobalTestState) {
|
|||||||
await exchange.runWirewatchOnce();
|
await exchange.runWirewatchOnce();
|
||||||
|
|
||||||
await merchant.stop();
|
await merchant.stop();
|
||||||
await merchant.start(false);
|
await merchant.start();
|
||||||
await merchant.pingUntilAvailable();
|
await merchant.pingUntilAvailable();
|
||||||
|
|
||||||
const r = await MerchantPrivateApi.queryTippingReserves(merchant, "default");
|
const r = await MerchantPrivateApi.queryTippingReserves(merchant, "default");
|
||||||
|
@ -186,8 +186,8 @@ async function refreshCreateSession(
|
|||||||
logger.trace(`printing selected denominations for refresh`);
|
logger.trace(`printing selected denominations for refresh`);
|
||||||
logger.trace(`current time: ${stringifyTimestamp(getTimestampNow())}`);
|
logger.trace(`current time: ${stringifyTimestamp(getTimestampNow())}`);
|
||||||
for (const denom of newCoinDenoms.selectedDenoms) {
|
for (const denom of newCoinDenoms.selectedDenoms) {
|
||||||
console.log(`denom ${denom.denom}, count ${denom.count}`);
|
logger.trace(`denom ${denom.denom}, count ${denom.count}`);
|
||||||
console.log(
|
logger.trace(
|
||||||
`withdrawal expiration ${stringifyTimestamp(
|
`withdrawal expiration ${stringifyTimestamp(
|
||||||
denom.denom.stampExpireWithdraw,
|
denom.denom.stampExpireWithdraw,
|
||||||
)}`,
|
)}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user