View Issue Details

IDProjectCategoryView StatusLast Update
0008830Talerwallet (Android App)public2024-06-05 18:45
ReporterFlorian Dold Assigned Togrote Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
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.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

avalos

2024-05-13 15:29

developer   ~0022404

Last edited: 2024-05-13 15: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 15:35

developer   ~0022405

Last edited: 2024-05-13 15: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 15:37

manager   ~0022406

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

avalos

2024-05-13 17: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 17:23

developer   ~0022418

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

grote

2024-05-15 18:30

reporter   ~0022423

fix merged into master

Issue History

Date ModifiedUsernameFieldChange
2024-05-13 10:07Florian DoldNew Issue
2024-05-13 10:07Florian DoldStatusnew => assigned
2024-05-13 10:07Florian DoldAssigned To => avalos
2024-05-13 15:29avalosNote Added: 0022404
2024-05-13 15:29avalosNote Edited: 0022404
2024-05-13 15:35avalosNote Added: 0022405
2024-05-13 15:35avalosFile Added: Screenshot_20240513_093458.png
2024-05-13 15:35avalosNote Edited: 0022405
2024-05-13 15:37Florian DoldNote Added: 0022406
2024-05-13 17:00avalosNote Added: 0022409
2024-05-14 17:23avalosAssigned Toavalos => grote
2024-05-14 17:23avalosStatusassigned => feedback
2024-05-14 17:23avalosNote Added: 0022418
2024-05-15 18:30groteStatusfeedback => informing
2024-05-15 18:30groteResolutionopen => fixed
2024-05-15 18:30groteNote Added: 0022423
2024-06-05 18:45Christian GrothoffStatusinforming => closed