logging / explicit wire deadline
This commit is contained in:
parent
ae8af3f27c
commit
7fac3bd17d
@ -17,7 +17,12 @@
|
||||
/**
|
||||
* Imports.
|
||||
*/
|
||||
import { CoreApiResponse } from "@gnu-taler/taler-util";
|
||||
import {
|
||||
ContractTerms,
|
||||
CoreApiResponse,
|
||||
getTimestampNow,
|
||||
timestampTruncateToSecond,
|
||||
} from "@gnu-taler/taler-util";
|
||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||
import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures";
|
||||
import {
|
||||
@ -272,10 +277,11 @@ export async function runLibeufinBasicTest(t: GlobalTestState) {
|
||||
console.log("balances", JSON.stringify(bal, undefined, 2));
|
||||
t.assertAmountEquals(bal.balances[0].available, "EUR:14.7");
|
||||
|
||||
const order = {
|
||||
const order: Partial<ContractTerms> = {
|
||||
summary: "Buy me!",
|
||||
amount: "EUR:5",
|
||||
fulfillment_url: "taler://fulfillment-success/thx",
|
||||
wire_transfer_deadline: timestampTruncateToSecond(getTimestampNow()),
|
||||
};
|
||||
|
||||
await makeTestPayment(t, { wallet, merchant, order });
|
||||
|
@ -110,8 +110,8 @@ export async function runRefundGoneTest(t: GlobalTestState) {
|
||||
talerRefundUri: ref.talerRefundUri,
|
||||
});
|
||||
|
||||
console.log("refund response:", rr);
|
||||
t.assertAmountEquals(rr.amountRefundGone, "TESTKUDOS:5");
|
||||
console.log(rr);
|
||||
|
||||
await wallet.runUntilDone();
|
||||
|
||||
|
@ -897,7 +897,7 @@ export async function createRefreshGroup(
|
||||
logger.trace(`created refresh group ${refreshGroupId}`);
|
||||
|
||||
processRefreshGroup(ws, refreshGroupId).catch((e) => {
|
||||
logger.warn(`processing refresh group ${refreshGroupId} failed`);
|
||||
logger.warn(`processing refresh group ${refreshGroupId} failed: ${e}`);
|
||||
});
|
||||
|
||||
return {
|
||||
|
@ -225,7 +225,6 @@ export namespace ContractTermsUtil {
|
||||
const cleaned = scrub(contractTerms);
|
||||
const canon = canonicalJson(cleaned) + "\0";
|
||||
const bytes = stringToBytes(canon);
|
||||
logger.info(`contract terms before hashing: ${encodeCrock(bytes)}`);
|
||||
return encodeCrock(hash(bytes));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user