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