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

[DDW-509] Remove delisted pools #2263

Merged
merged 1 commit into from
Dec 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Changelog

### Fixes

- Fixed removal of stake pools which have been delisted on SMASH ([PR 2263](https://github.com/input-output-hk/daedalus/pull/2263))
- Fixed error message and validation on redeem rewards screen ([PR 2220](https://github.com/input-output-hk/daedalus/pull/2220))
- Fixed empty disk space calculation for some Linux distributions ([PR 2258](https://github.com/input-output-hk/daedalus/pull/2258))
- Fixed the overlap of the "X" button in the stake pools search box ([PR 2251](https://github.com/input-output-hk/daedalus/pull/2251))
Expand Down
1 change: 1 addition & 0 deletions source/renderer/app/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,7 @@ export default class AdaApi {
);
const stakePools = response
.filter(({ metadata }: AdaApiStakePool) => metadata !== undefined)
.filter(({ flags }: AdaApiStakePool) => !flags.includes('delisted'))
.filter(
({ margin }: AdaApiStakePool) =>
margin !== undefined && margin.quantity < 100
Expand Down
4 changes: 4 additions & 0 deletions source/renderer/app/api/staking/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export type DelegationAction =
| 'removeDelegation'
| 'delegate';

export type AdaApiStakePoolFlag = 'delisted';
export type AdaApiStakePoolFlags = Array<AdaApiStakePoolFlag>;

export type AdaApiStakePool = {
id: string,
metrics: {
Expand Down Expand Up @@ -47,6 +50,7 @@ export type AdaApiStakePool = {
epoch_number: number,
epoch_start_time: string,
},
flags: AdaApiStakePoolFlags,
};
export type AdaApiStakePools = Array<AdaApiStakePool>;

Expand Down