Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light mode: fetch reward account balances #3231

Merged
merged 2 commits into from
Apr 20, 2022

Conversation

Unisay
Copy link
Contributor

@Unisay Unisay commented Apr 11, 2022

Issue Number

ADP-1422, ADP-1506

Overview

Light-mode (Epic ADP-1422) aims to make synchronisation to the blockchain faster by trusting an off-chain source of aggregated blockchain data.

In this pull request, I have implemented two functions of the NetworkLayer interface:

  • getCachedRewardAccountBalance
  • fetchRewardAccountBalances

@Unisay Unisay requested a review from HeinrichApfelmus April 11, 2022 15:42
@Unisay Unisay self-assigned this Apr 11, 2022
@Unisay Unisay force-pushed the yura/ADP-1506/reward-account-balance branch from 77654c5 to a1f83f0 Compare April 13, 2022 15:31
@Unisay Unisay requested a review from HeinrichApfelmus April 13, 2022 15:31
@Unisay Unisay force-pushed the yura/ADP-1506/reward-account-balance branch from acc2649 to abb7825 Compare April 13, 2022 15:57
Copy link
Contributor

@HeinrichApfelmus HeinrichApfelmus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 😊

handleBlockfrostError . fmap Map.fromList $
for (Set.toList accounts) $ \rewardAccount -> do
BF.AccountInfo {..} <- liftBlockfrost $ BF.getAccount $
BF.mkAddress $ encodeStakeAddress @nd rewardAccount
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks much better. I hope that this is correct now, but there is little we can do besides a manual test and perhaps a second look that we do indeed have unit tests for deodeStakeAddress and encodeStakeAddress

@Unisay
Copy link
Contributor Author

Unisay commented Apr 19, 2022

bors r+

iohk-bors bot added a commit that referenced this pull request Apr 19, 2022
3231: Light mode: fetch reward account balances r=Unisay a=Unisay

### Issue Number

ADP-1422, ADP-1506

### Overview

[Light-mode][] (Epic ADP-1422) aims to make synchronisation to the blockchain faster by trusting an off-chain source of aggregated blockchain data. 

  [light-mode]: https://input-output-hk.github.io/cardano-wallet/design/specs/light-mode

In this pull request, I have implemented two functions of the `NetworkLayer` interface:

- getCachedRewardAccountBalance
- fetchRewardAccountBalances


Co-authored-by: Yuriy Lazaryev <yuriy.lazaryev@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Apr 19, 2022

Build failed:

Build Timed Out

@Unisay
Copy link
Contributor Author

Unisay commented Apr 20, 2022

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Apr 20, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit 2e51451 into master Apr 20, 2022
@iohk-bors iohk-bors bot deleted the yura/ADP-1506/reward-account-balance branch April 20, 2022 09:33
WilliamKingNoel-Bot pushed a commit that referenced this pull request Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants