From 3eb88574bcf327672c34120becfb511eac4e06cd Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 15 May 2020 16:03:52 +0530 Subject: address first batch of transaction list issues --- src/operations/tip.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/operations/tip.ts') diff --git a/src/operations/tip.ts b/src/operations/tip.ts index f584fc502..15d2339b5 100644 --- a/src/operations/tip.ts +++ b/src/operations/tip.ts @@ -34,8 +34,9 @@ import { } from "../types/dbTypes"; import { getExchangeWithdrawalInfo, - getVerifiedWithdrawDenomList, + selectWithdrawalDenoms, processWithdrawGroup, + denomSelectionInfoToState, } from "./withdraw"; import { updateExchangeFromUrl } from "./exchanges"; import { getRandomBytes, encodeCrock } from "../crypto/talerCrypto"; @@ -81,7 +82,7 @@ export async function getTipStatus( ); const tipId = encodeCrock(getRandomBytes(32)); - const selectedDenoms = await getVerifiedWithdrawDenomList( + const selectedDenoms = await selectWithdrawalDenoms( ws, tipPickupStatus.exchange_url, amount, @@ -107,16 +108,7 @@ export async function getTipStatus( ).amount, retryInfo: initRetryInfo(), lastError: undefined, - denomsSel: { - totalCoinValue: selectedDenoms.totalCoinValue, - totalWithdrawCost: selectedDenoms.totalWithdrawCost, - selectedDenoms: selectedDenoms.selectedDenoms.map((x) => { - return { - count: x.count, - denomPubHash: x.denom.denomPubHash, - }; - }), - }, + denomsSel: denomSelectionInfoToState(selectedDenoms), }; await ws.db.put(Stores.tips, tipRecord); } -- cgit v1.2.3