View Issue Details

IDProjectCategoryView StatusLast Update
0007768Talerlibeufin-bank-ui (SPA)public2023-09-23 15:09
ReporterMS Assigned Tosebasjm  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.9.3Fixed in Version0.9.3 
Summary0007768: cash-out rates wrong when starting from fiat.
DescriptionWhen the cash-out amount is calculated starting from the fiat, then the UI
submits a rates/fees application that's not accepted by the backend.
TagsNo tags attached.

Activities

sebasjm

2023-03-15 13:46

developer   ~0019964

the truncation of amount after applying rate conversion is wrong, here [1] SPA is doing a simple string truncation and libeufin does a BigDecimal round up, SPA should match that [2]

if calculateFromCredit with amount 3.15 sellFee 0 sellRate 0.95 I get amount debit debitAmount 3.31 which is wrong because calculateFromCredit for amount 3.31 (same rates) the credit is 3.14 !== 3.15

Amounts API in taler-util doesnt have a truncation or roundup function, should we add this function in amounts API?


[1] https://git.taler.net/wallet-core.git/tree/packages/demobank-ui/src/pages/BusinessAccount.tsx#n839
[2] https://git.taler.net/libeufin.git/tree/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt#n404

sebasjm

2023-04-01 00:16

developer   ~0019998

using the cashouts/estimate endpoint

sebasjm

2023-04-01 00:16

developer   ~0019999

fixed at f947c8e54919343ac4f5f951d2f701651c06dd52

Issue History

Date Modified Username Field Change
2023-03-14 12:43 MS New Issue
2023-03-14 12:43 MS Status new => assigned
2023-03-14 12:43 MS Assigned To => sebasjm
2023-03-15 13:46 sebasjm Note Added: 0019964
2023-04-01 00:16 sebasjm Note Added: 0019998
2023-04-01 00:16 sebasjm Status assigned => resolved
2023-04-01 00:16 sebasjm Resolution open => fixed
2023-04-01 00:16 sebasjm Note Added: 0019999
2023-05-04 20:06 Christian Grothoff Fixed in Version => 0.9.3
2023-05-04 20:06 Christian Grothoff Target Version => 0.9.3
2023-09-23 15:09 Christian Grothoff Status resolved => closed
2023-12-03 01:21 Christian Grothoff Category demobank-ui => libeufin-bank-ui
2024-01-12 14:10 Christian Grothoff Category libeufin-bank-ui => libeufin-bank-ui (SPA)