From 1039689b52e6b775936f1e773dc835c0d6b28bb6 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 3 Nov 2023 19:13:28 -0300 Subject: update to dd51 and removing unused EC --- packages/taler-wallet-core/src/operations/reward.ts | 4 ++-- packages/taler-wallet-core/src/operations/withdraw.ts | 6 +----- packages/taler-wallet-core/src/wallet.ts | 16 +++++----------- 3 files changed, 8 insertions(+), 18 deletions(-) (limited to 'packages') diff --git a/packages/taler-wallet-core/src/operations/reward.ts b/packages/taler-wallet-core/src/operations/reward.ts index ed9927bab..5d609f41d 100644 --- a/packages/taler-wallet-core/src/operations/reward.ts +++ b/packages/taler-wallet-core/src/operations/reward.ts @@ -379,9 +379,9 @@ export async function processTip( return { type: TaskRunResultType.Error, errorDetail: makeErrorDetail( - TalerErrorCode.WALLET_TIPPING_COIN_SIGNATURE_INVALID, + TalerErrorCode.WALLET_REWARD_COIN_SIGNATURE_INVALID, {}, - "invalid signature from the exchange (via merchant tip) after unblinding", + "invalid signature from the exchange (via merchant reward) after unblinding", ), }; } diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index fc4214e56..b0d7706a3 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -1236,11 +1236,7 @@ async function queryReserve( logger.trace( `got reserve status error, EC=${result.talerErrorResponse.code}`, ); - if ( - resp.status === 404 && - result.talerErrorResponse.code === - TalerErrorCode.EXCHANGE_RESERVES_STATUS_UNKNOWN - ) { + if (resp.status === HttpStatusCode.NotFound) { return { ready: false }; } else { throwUnexpectedRequestError(resp, result.talerErrorResponse); diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 2dc984979..e917e8059 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -932,9 +932,9 @@ async function dumpCoins(ws: InternalWalletState): Promise { ageCommitmentProof: c.ageCommitmentProof, spend_allocation: c.spendAllocation ? { - amount: c.spendAllocation.amount, - id: c.spendAllocation.id, - } + amount: c.spendAllocation.amount, + id: c.spendAllocation.id, + } : undefined, }); } @@ -1461,12 +1461,10 @@ async function dispatchRequestInternal( if (req.scope.currency === "KUDOS") { const kudosResp: GetCurrencySpecificationResponse = { currencySpecification: { - decimal_separator: ",", name: "Kudos (Taler Demonstrator)", num_fractional_input_digits: 2, num_fractional_normal_digits: 2, num_fractional_trailing_zero_digits: 2, - is_currency_name_leading: true, alt_unit_names: { "0": "ク", }, @@ -1476,14 +1474,12 @@ async function dispatchRequestInternal( } else if (req.scope.currency === "TESTKUDOS") { const testkudosResp: GetCurrencySpecificationResponse = { currencySpecification: { - decimal_separator: ",", name: "Test (Taler Unstable Demonstrator)", num_fractional_input_digits: 0, num_fractional_normal_digits: 0, num_fractional_trailing_zero_digits: 0, - is_currency_name_leading: false, alt_unit_names: { - "0": "テ", + "0": "テ", }, }, }; @@ -1491,14 +1487,12 @@ async function dispatchRequestInternal( } const defaultResp: GetCurrencySpecificationResponse = { currencySpecification: { - decimal_separator: ",", name: "Unknown", num_fractional_input_digits: 2, num_fractional_normal_digits: 2, num_fractional_trailing_zero_digits: 2, - is_currency_name_leading: true, alt_unit_names: { - "0": "??", + "0": "??", }, }, }; -- cgit v1.2.3