Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Oct 26, 2020
1 parent 016932b commit 623af75
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 0 additions & 2 deletions lib/core/src/Cardano/Wallet.hs
Expand Up @@ -2437,7 +2437,6 @@ data ErrJoinStakePool
| ErrJoinStakePoolSignDelegation ErrSignDelegation
| ErrJoinStakePoolSubmitTx ErrSubmitTx
| ErrJoinStakePoolCannotJoin ErrCannotJoin
| ErrJoinStakePoolUnableToAssignInputs CoinSelection
deriving (Generic, Eq, Show)

data ErrQuitStakePool
Expand All @@ -2446,7 +2445,6 @@ data ErrQuitStakePool
| ErrQuitStakePoolSignDelegation ErrSignDelegation
| ErrQuitStakePoolSubmitTx ErrSubmitTx
| ErrQuitStakePoolCannotQuit ErrCannotQuit
| ErrQuitStakePoolUnableToAssignInputs CoinSelection
deriving (Generic, Eq, Show)

-- | Errors that can occur when fetching the reward balance of a wallet
Expand Down
8 changes: 0 additions & 8 deletions lib/core/src/Cardano/Wallet/Api/Server.hs
Expand Up @@ -2652,10 +2652,6 @@ instance LiftHandler ErrJoinStakePool where
[ "I couldn't find any stake pool with the given id: "
, toText pid
]
ErrJoinStakePoolUnableToAssignInputs e ->
apiError err500 UnableToAssignInputOutput $ mconcat
[ "I'm unable to assign inputs from coin selection: "
, pretty e]

instance LiftHandler ErrFetchRewards where
handler = \case
Expand Down Expand Up @@ -2692,10 +2688,6 @@ instance LiftHandler ErrQuitStakePool where
, "account! Make sure to withdraw your ", pretty rewards
, " lovelace first."
]
ErrQuitStakePoolUnableToAssignInputs e ->
apiError err500 UnableToAssignInputOutput $ mconcat
[ "I'm unable to assign inputs from coin selection: "
, pretty e]

instance LiftHandler ErrCreateRandomAddress where
handler = \case
Expand Down
9 changes: 7 additions & 2 deletions specifications/api/swagger.yaml
Expand Up @@ -1895,7 +1895,9 @@ x-responsesErrWalletNotFound: &responsesErrWalletNotFound
properties:
message:
type: string
description: A descriptive error message.
description: |
May occur when a given walletId does not match with any known
wallets (because it has been deleted, or has never existed).
code:
type: string
enum: ['no_such_wallet']
Expand All @@ -1908,7 +1910,10 @@ x-responsesErrBadRequest: &responsesErrBadRequest
properties:
message:
type: string
description: Explanation of a good request.
description: |
May occur when a request is not well-formed; that is, it fails to parse
successfully. This could be the case when some required parameters
are missing or, when wrong values are provided.
code:
type: string
enum: ['bad_request']
Expand Down

0 comments on commit 623af75

Please sign in to comment.