diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-05-15 16:03:52 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-05-15 16:03:52 +0530 |
commit | 3eb88574bcf327672c34120becfb511eac4e06cd (patch) | |
tree | 9d54748adef52dc9a21c8ea97c7d034cd773277a /src/operations/tip.ts | |
parent | 35c83414f9e0af11012c1a2e00672d2a7c1856ae (diff) | |
download | wallet-core-3eb88574bcf327672c34120becfb511eac4e06cd.tar.xz |
address first batch of transaction list issues
Diffstat (limited to 'src/operations/tip.ts')
-rw-r--r-- | src/operations/tip.ts | 16 |
1 files changed, 4 insertions, 12 deletions
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); } |