View Issue Details

IDProjectCategoryView StatusLast Update
0008830Talerwallet (Android App)public2024-06-05 20:45
ReporterFlorian Dold Assigned Togrote  
PriorityurgentSeveritycrashReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.11 
Summary0008830: Android wallet crashes when displaying an aborted peer-push-debit transaction
DescriptionSee summary.
Steps To ReproduceCreate an outgoing p2p payment, abort it.
TagsNo tags attached.

Activities

avalos

2024-05-13 17:29

developer   ~0022404

Last edited: 2024-05-13 17:29

It's a negative fee issue again, I still don't know how to handle those. Is this fine?

```
if (t.amountEffective > t.amountRaw) {
    val fee = t.amountEffective - t.amountRaw
    if (!fee.isZero()) {
        TransactionAmountComposable(
            label = stringResource(id = R.string.withdraw_fees),
            amount = fee.withSpec(spec),
            amountType = AmountType.Negative,
        )
    }
}
```

If the fee will be negative, it simply doesn't show it.

avalos

2024-05-13 17:35

developer   ~0022405

Last edited: 2024-05-13 17:35

This is how an aborted peer-push debit transaction would be rendered.
Screenshot_20240513_093458.png (37,382 bytes)   
Screenshot_20240513_093458.png (37,382 bytes)   

Florian Dold

2024-05-13 17:37

manager   ~0022406

How can the fee be negative? It crashes in deployments where there is *no* fee at all!

avalos

2024-05-13 19:00

developer   ~0022409

The result of subtracting the raw amount to the effective amount is negative:

```
{
    "type": "peer-push-debit",
    "txState": {
        "major": "aborting",
        "minor": "delete-purse"
    },
    "txActions": [
        "suspend",
        "fail"
    ],
    "amountEffective": "KUDOS:0",
    "amountRaw": "KUDOS:0.2",
    "exchangeBaseUrl": "https://exchange.demo.taler.net/",
    "info": {
        "expiration": {
        "t_s": 1715705913
        },
        "summary": "Crash!"
    },
    "timestamp": {
        "t_s": 1715619513,
        "off_us": 773000
    },
    "transactionId": "txn:peer-push-debit:VMDTHY695CW6A5PYE20XW85A47PFA150B7B7RD36Q4F8J84VZMWG"
}
```

avalos

2024-05-14 19:23

developer   ~0022418

Additional checks for negative fees have been implemented in dev/ivan-avalos/master.

grote

2024-05-15 20:30

developer   ~0022423

fix merged into master

Issue History

Date Modified Username Field Change
2024-05-13 12:07 Florian Dold New Issue
2024-05-13 12:07 Florian Dold Status new => assigned
2024-05-13 12:07 Florian Dold Assigned To => avalos
2024-05-13 17:29 avalos Note Added: 0022404
2024-05-13 17:29 avalos Note Edited: 0022404
2024-05-13 17:35 avalos Note Added: 0022405
2024-05-13 17:35 avalos File Added: Screenshot_20240513_093458.png
2024-05-13 17:35 avalos Note Edited: 0022405
2024-05-13 17:37 Florian Dold Note Added: 0022406
2024-05-13 19:00 avalos Note Added: 0022409
2024-05-14 19:23 avalos Assigned To avalos => grote
2024-05-14 19:23 avalos Status assigned => feedback
2024-05-14 19:23 avalos Note Added: 0022418
2024-05-15 20:30 grote Status feedback => resolved
2024-05-15 20:30 grote Resolution open => fixed
2024-05-15 20:30 grote Note Added: 0022423
2024-06-05 20:45 Christian Grothoff Status resolved => closed