gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: Anastasis API helper function


From: gnunet
Subject: [taler-wallet-core] branch master updated: Anastasis API helper function.
Date: Tue, 17 Aug 2021 12:22:02 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 93b455a2 Anastasis API helper function.
93b455a2 is described below

commit 93b455a28aa949bdbed2672731cbbbc7c99a87b8
Author: MS <ms@taler.net>
AuthorDate: Mon Aug 16 23:21:35 2021 -1100

    Anastasis API helper function.
---
 .../taler-wallet-cli/src/integrationtests/libeufin.ts  | 18 ++++++++++++++++++
 .../integrationtests/test-libeufin-facade-anastasis.ts | 13 +++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts 
b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
index 71c7aad6..f9266a39 100644
--- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
@@ -1157,6 +1157,24 @@ export namespace LibeufinNexusApi {
     let response = await axios.get(url.href);
   }
 
+  // Uses the Anastasis API to get a list of transactions.
+  export async function getAnastasisTransactions(
+    libeufinNexusService: LibeufinNexusService,
+    anastasisBaseUrl: string,
+    params: {}, // of the request: {delta: 5, ..}
+    username: string = "admin",
+    password: string = "test",
+  ): Promise<any> {
+    let url = new URL("/history/incoming", anastasisBaseUrl);
+    let response = await axios.get(url.href, { params: params,
+      auth: {
+        username: username,
+        password: password,
+      },
+    });
+    return response;
+  }
+
   // FIXME: this function should return some structured
   // object that represents a history.
   export async function getAccountTransactions(
diff --git 
a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts
 
b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts
index f412ab8e..528d398a 100644
--- 
a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts
+++ 
b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts
@@ -23,6 +23,7 @@ import {
   NexusUserBundle,
   launchLibeufinServices,
   LibeufinNexusApi,
+  LibeufinSandboxApi,
 } from "./libeufin";
 
 /**
@@ -58,6 +59,18 @@ export async function runLibeufinApiFacadeTest(t: 
GlobalTestState) {
   t.assertTrue(anastasisBaseUrl.startsWith("http://";));
   t.assertTrue(anastasisBaseUrl.endsWith("/"));
 
+  LibeufinSandboxApi.simulateIncomingTransaction(
+    libeufinServices.libeufinSandbox,
+    user01nexus.localAccountName,
+    {
+      debtorIban: "ES3314655813489414469157",
+      debtorBic: "BCMAESM1XXX",
+      debtorName: "Mock Donor",
+      subject: "Anastasis donation",
+      amount: "EUR:3",
+    },
+  )
+
         //***************************************//
         // Here payments need to be generated    //
         // and checked via the Anastasis facade. //

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]