diff options
author | Florian Dold <florian@dold.me> | 2022-03-18 15:32:41 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-21 19:20:48 +0100 |
commit | f8d12f7b0d4af1b1769b89e80c87f9c169678564 (patch) | |
tree | 2478696c7bc1efc6d090b93aa340de542a7dccd9 /packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts | |
parent | 32cd54e11d80bde0274b3c0238f8f5bd00ff83cb (diff) | |
download | wallet-core-f8d12f7b0d4af1b1769b89e80c87f9c169678564.tar.xz |
wallet: t_s/d_us migration
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts b/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts index ed07114eb..e2b81ee6a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts @@ -18,11 +18,11 @@ * Imports. */ import { + AbsoluteTime, codecForExchangeKeysJson, DenominationPubKey, Duration, durationFromSpec, - stringifyTimestamp, } from "@gnu-taler/taler-util"; import { NodeHttpLib, @@ -174,27 +174,37 @@ export async function runExchangeTimetravelTest(t: GlobalTestState) { const denomPubs1 = keys1.denoms.map((x) => { return { denomPub: x.denom_pub, - expireDeposit: stringifyTimestamp(x.stamp_expire_deposit), + expireDeposit: AbsoluteTime.stringify( + AbsoluteTime.fromTimestamp(x.stamp_expire_deposit), + ), }; }); const denomPubs2 = keys2.denoms.map((x) => { return { denomPub: x.denom_pub, - expireDeposit: stringifyTimestamp(x.stamp_expire_deposit), + expireDeposit: AbsoluteTime.stringify( + AbsoluteTime.fromTimestamp(x.stamp_expire_deposit), + ), }; }); const dps2 = new Set(denomPubs2.map((x) => x.denomPub)); console.log("=== KEYS RESPONSE 1 ==="); - console.log("list issue date", stringifyTimestamp(keys1.list_issue_date)); + console.log( + "list issue date", + AbsoluteTime.stringify(AbsoluteTime.fromTimestamp(keys1.list_issue_date)), + ); console.log("num denoms", keys1.denoms.length); console.log("denoms", JSON.stringify(denomPubs1, undefined, 2)); console.log("=== KEYS RESPONSE 2 ==="); - console.log("list issue date", stringifyTimestamp(keys2.list_issue_date)); + console.log( + "list issue date", + AbsoluteTime.stringify(AbsoluteTime.fromTimestamp(keys2.list_issue_date)), + ); console.log("num denoms", keys2.denoms.length); console.log("denoms", JSON.stringify(denomPubs2, undefined, 2)); @@ -214,8 +224,8 @@ export async function runExchangeTimetravelTest(t: GlobalTestState) { `denomination with public key ${da.denomPub} is not present in new /keys response`, ); console.log( - `the new /keys response was issued ${stringifyTimestamp( - keys2.list_issue_date, + `the new /keys response was issued ${AbsoluteTime.stringify( + AbsoluteTime.fromTimestamp(keys2.list_issue_date), )}`, ); console.log( |