Skip to content

Commit

Permalink
Merge #2261
Browse files Browse the repository at this point in the history
2261: Update the API specification to reflect the minimum number of inputs returned by `selectCoins`. r=KtorZ a=jonathanknowles

# Issue

Related to #2244.

# Overview

This PR updates the API specification for the `selectCoins` operation, changing the minimum number of inputs from `0` to `1` in the returned coin selection.

This matches the existing `ApiCoinSelection` type, which specifies a `NonEmpty` list of `ApiCoinSelectionInput` values:

```hs
data ApiCoinSelection (n :: NetworkDiscriminant) = ApiCoinSelection
    { inputs :: !(NonEmpty (ApiCoinSelectionInput n))
    , outputs :: ![ApiCoinSelectionOutput n]
    , change :: ![ApiCoinSelectionChange n]
    , certificates :: Maybe (NonEmpty ApiCertificate)
    } deriving (Eq, Generic, Show)
```


Co-authored-by: Jonathan Knowles <[email protected]>
  • Loading branch information
iohk-bors[bot] and jonathanknowles authored Oct 22, 2020
2 parents 61b6dc9 + f03919d commit d9a79f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specifications/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ x-transactionChange: &transactionChange
x-transactionResolvedInputs: &transactionResolvedInputs
description: A list of transaction inputs
type: array
minItems: 0
minItems: 1
items:
type: object
required:
Expand Down

0 comments on commit d9a79f4

Please sign in to comment.