gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: wallet-core: fix tipping


From: gnunet
Subject: [taler-wallet-core] branch master updated: wallet-core: fix tipping
Date: Fri, 15 Sep 2023 17:04:53 +0200

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 0ff189d22 wallet-core: fix tipping
0ff189d22 is described below

commit 0ff189d229b348422239670223b4944b42596f63
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Sep 15 17:04:44 2023 +0200

    wallet-core: fix tipping
---
 packages/taler-util/src/MerchantApiClient.ts        | 2 +-
 packages/taler-wallet-core/src/dbless.ts            | 5 ++++-
 packages/taler-wallet-core/src/operations/reward.ts | 7 +++++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/packages/taler-util/src/MerchantApiClient.ts 
b/packages/taler-util/src/MerchantApiClient.ts
index ccbbf79b3..988872ae7 100644
--- a/packages/taler-util/src/MerchantApiClient.ts
+++ b/packages/taler-util/src/MerchantApiClient.ts
@@ -269,7 +269,7 @@ export class MerchantApiClient {
   }
 
   async giveTip(req: RewardCreateRequest): Promise<RewardCreateConfirmation> {
-    const reqUrl = new URL(`private/tips`, this.baseUrl);
+    const reqUrl = new URL(`private/rewards`, this.baseUrl);
     const resp = await this.httpClient.fetch(reqUrl.href, {
       method: "POST",
       body: req,
diff --git a/packages/taler-wallet-core/src/dbless.ts 
b/packages/taler-wallet-core/src/dbless.ts
index d70eab888..4d2fa5cd4 100644
--- a/packages/taler-wallet-core/src/dbless.ts
+++ b/packages/taler-wallet-core/src/dbless.ts
@@ -276,7 +276,10 @@ export async function depositCoin(args: {
     merchant_pub: merchantPub,
   };
   const url = new URL(`batch-deposit`, dp.exchange_url);
-  const httpResp = await http.fetch(url.href, { body: requestBody });
+  const httpResp = await http.fetch(url.href, {
+    method: "POST",
+    body: requestBody,
+  });
   await readSuccessResponseJsonOrThrow(httpResp, 
codecForBatchDepositSuccess());
 }
 
diff --git a/packages/taler-wallet-core/src/operations/reward.ts 
b/packages/taler-wallet-core/src/operations/reward.ts
index ddcfb20ac..4e16d977d 100644
--- a/packages/taler-wallet-core/src/operations/reward.ts
+++ b/packages/taler-wallet-core/src/operations/reward.ts
@@ -304,13 +304,16 @@ export async function processTip(
   }
 
   const tipStatusUrl = new URL(
-    `tips/${tipRecord.merchantRewardId}/pickup`,
+    `rewards/${tipRecord.merchantRewardId}/pickup`,
     tipRecord.merchantBaseUrl,
   );
 
   const req = { planchets: planchetsDetail };
   logger.trace(`sending tip request: ${j2s(req)}`);
-  const merchantResp = await ws.http.postJson(tipStatusUrl.href, req);
+  const merchantResp = await ws.http.fetch(tipStatusUrl.href, {
+    method: "POST",
+    body: req,
+  });
 
   logger.trace(`got tip response, status ${merchantResp.status}`);
 

-- 
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]