Skip to content

Commit

Permalink
Merge #1830
Browse files Browse the repository at this point in the history
1830: Add skeleton `retirement` field to `ApiStakePool`.  r=jonathanknowles a=jonathanknowles

# Issue Number

#1818 

# Overview

This PR:

- [x] Adds a skeleton `retirement` field to the `ApiStakePool` type:
    ```patch
    data ApiStakePool = ApiStakePool  
        { id :: !(ApiT PoolId)
        , metrics :: !ApiStakePoolMetrics 
        , metadata :: !(Maybe (ApiT StakePoolMetadata))   
        , cost :: !(Maybe (Quantity "lovelace" Natural))  
        , margin :: !(Maybe (Quantity "percent" Percentage))  
        , pledge :: !(Maybe (Quantity "lovelace" Natural))
    +   , retirement :: !(Maybe ApiEpochInfo)
        } deriving (Eq, Generic, Show)
    ````
- [x] Updates the equivalent swagger definition for `ApiStakePool`.
- [x] Updates the golden JSON samples for `ApiStakePool`.
- [x] Promotes `ApiEpochInfo` to a top-level swagger definition, making it easier to reuse.
- [x] Fixes (for the moment) the value of the `retirement` to `Nothing`. (Future PRs will arrange that this value reflects the actual retirement status of a pool.)

Co-authored-by: Jonathan Knowles <jonathan.knowles@iohk.io>
  • Loading branch information
iohk-bors[bot] and jonathanknowles committed Jul 1, 2020
2 parents a60c277 + a9bedaf commit f232636
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 134 deletions.
1 change: 1 addition & 0 deletions lib/core/src/Cardano/Wallet/Api/Types.hs
Expand Up @@ -396,6 +396,7 @@ data ApiStakePool = ApiStakePool
, cost :: !(Maybe (Quantity "lovelace" Natural))
, margin :: !(Maybe (Quantity "percent" Percentage))
, pledge :: !(Maybe (Quantity "lovelace" Natural))
, retirement :: !(Maybe ApiEpochInfo)
} deriving (Eq, Generic, Show)

data ApiStakePoolMetrics = ApiStakePoolMetrics
Expand Down

0 comments on commit f232636

Please sign in to comment.