Skip to content

Commit

Permalink
Merge #3386
Browse files Browse the repository at this point in the history
3386: Light-mode: Fixes for Ada balance and rewards r=HeinrichApfelmus a=HeinrichApfelmus

### Issue number

ADP-2013

### Overview

This pull request fixes a couple of issues with light-mode, specifically those relating to the ADA and reward balances.

### Details
* Fix accidental interchange of regular and collateral inputs in `fromInputs`.
* Fix usage of `wholeList`. This function only makes sense when we fetch an entire block — only then do we know that we have the whole list, not just a sublist.
* Use `_accountInfoWithdrawableAmount` instead of`_accountInfoRewardsSum`. It looks like the latter function shows all rewards that were ever accumulated, while we want the balance of rewards that can still be withdrawn from the account.
* Fix filtering of transactions for RewardAccount — we only want those transactions that fall within the bounds `bhFrom` and `bhTo`.
* Fix sorting of transaction outputs — it turns out that `_transactionUtxosOutputs` does not necessarily yield the transaction outputs in order, which messes up the output indices.


Co-authored-by: Heinrich Apfelmus <[email protected]>
  • Loading branch information
iohk-bors[bot] and HeinrichApfelmus authored Jul 26, 2022
2 parents 53f9e6e + 2bca877 commit 2540427
Showing 1 changed file with 220 additions and 192 deletions.
Loading

0 comments on commit 2540427

Please sign in to comment.