aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-cli/src')
-rw-r--r--packages/taler-wallet-cli/src/index.ts9
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer.ts26
2 files changed, 32 insertions, 3 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index ebcee2054..a1073dc31 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -1149,7 +1149,7 @@ testCli
tVerify.start();
const attestRes = AgeRestriction.commitmentVerify(
commitProof.commitment,
- attest,
+ encodeCrock(attest),
18,
);
tVerify.stop();
@@ -1157,9 +1157,12 @@ testCli
throw Error();
}
- const salt = encodeCrock(getRandomBytes(32));
+ const salt = getRandomBytes(32);
tDerive.start();
- const deriv = await AgeRestriction.commitmentDerive(commitProof, salt);
+ const deriv = await AgeRestriction.commitmentDerive(
+ commitProof,
+ salt,
+ );
tDerive.stop();
tCompare.start();
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer.ts b/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer.ts
index 4d27f45d7..5c716dc54 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer.ts
@@ -44,10 +44,36 @@ export async function runPeerToPeerTest(t: GlobalTestState) {
WalletApiOperation.InitiatePeerPushPayment,
{
amount: "TESTKUDOS:5",
+ partialContractTerms: {
+ summary: "Hello World",
+ },
},
);
console.log(resp);
+
+ const checkResp = await wallet.client.call(
+ WalletApiOperation.CheckPeerPushPayment,
+ {
+ contractPriv: resp.contractPriv,
+ exchangeBaseUrl: resp.exchangeBaseUrl,
+ pursePub: resp.pursePub,
+ },
+ );
+
+ console.log(checkResp);
+
+ const acceptResp = await wallet.client.call(
+ WalletApiOperation.AcceptPeerPushPayment,
+ {
+ exchangeBaseUrl: resp.exchangeBaseUrl,
+ pursePub: resp.pursePub,
+ },
+ );
+
+ console.log(acceptResp);
+
+ await wallet.runUntilDone();
}
runPeerToPeerTest.suites = ["wallet"];