gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: cleanup


From: gnunet
Subject: [taler-wallet-core] branch master updated: cleanup
Date: Tue, 05 Mar 2024 17:41:57 +0100

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 f9c45391b cleanup
f9c45391b is described below

commit f9c45391bed222b4ebbedc376a30e44051d2a649
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Mar 5 17:41:52 2024 +0100

    cleanup
---
 packages/taler-util/src/wallet-types.ts  |  2 +-
 packages/taler-wallet-core/src/wallet.ts | 28 ++--------------------------
 2 files changed, 3 insertions(+), 27 deletions(-)

diff --git a/packages/taler-util/src/wallet-types.ts 
b/packages/taler-util/src/wallet-types.ts
index 4fb9b77e7..ef1581af5 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -1821,7 +1821,7 @@ export interface AcceptManualWithdrawalRequest {
   restrictAge?: number;
 }
 
-export const codecForAcceptManualWithdrawalRequet =
+export const codecForAcceptManualWithdrawalRequest =
   (): Codec<AcceptManualWithdrawalRequest> =>
     buildCodecForObject<AcceptManualWithdrawalRequest>()
       .property("exchangeBaseUrl", codecForString())
diff --git a/packages/taler-wallet-core/src/wallet.ts 
b/packages/taler-wallet-core/src/wallet.ts
index 28d54fde3..b9d277cf0 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -71,7 +71,7 @@ import {
   codecForAbortTransaction,
   codecForAcceptBankIntegratedWithdrawalRequest,
   codecForAcceptExchangeTosRequest,
-  codecForAcceptManualWithdrawalRequet,
+  codecForAcceptManualWithdrawalRequest,
   codecForAcceptPeerPullPaymentRequest,
   codecForAddExchangeRequest,
   codecForAddGlobalCurrencyAuditorRequest,
@@ -848,7 +848,7 @@ async function dispatchRequestInternal<Op extends 
WalletApiOperation>(
       });
     }
     case WalletApiOperation.AcceptManualWithdrawal: {
-      const req = codecForAcceptManualWithdrawalRequet().decode(payload);
+      const req = codecForAcceptManualWithdrawalRequest().decode(payload);
       const res = await createManualWithdrawal(wex, {
         amount: Amounts.parseOrThrow(req.amount),
         exchangeBaseUrl: req.exchangeBaseUrl,
@@ -869,7 +869,6 @@ async function dispatchRequestInternal<Op extends 
WalletApiOperation>(
       for (const x of wi.selectedDenoms.selectedDenoms) {
         numCoins += x.count;
       }
-      const amt = Amounts.parseOrThrow(req.amount);
       const resp: WithdrawalDetailsForAmount = {
         amountRaw: req.amount,
         amountEffective: Amounts.stringify(wi.selectedDenoms.totalCoinValue),
@@ -1802,26 +1801,3 @@ export class InternalWalletState {
     }
   }
 }
-
-/**
- * Take the full object as template, create a new result with all the values.
- * Use the override object to change the values in the result
- * return result
- * @param full
- * @param override
- * @returns
- */
-function deepMerge<T extends object>(full: T, override: object): T {
-  const keys = Object.keys(full);
-  const result = { ...full };
-  for (const k of keys) {
-    // @ts-ignore
-    const newVal = override[k];
-    if (newVal === undefined) continue;
-    // @ts-ignore
-    result[k] =
-      // @ts-ignore
-      typeof newVal === "object" ? deepMerge(full[k], newVal) : newVal;
-  }
-  return result;
-}

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