Users of the API would like to know the cost of joining a stake-pool before pulling the trigger.
In this task we implement the API, leveraging the work of #1094.
Add the following endpoint:
/wallets/\{walletId\}/delegations/fees:
get:
operationId: getDelegationFee
tags: ["Stake Pools"]
summary: Estimate Fee
parameters:
- *parametersWalletId
responses: *responsesGetDelegationFee
x-responsesGetDelegationFee: &responsesGetDelegationFee
<<: *responsesErr403
<<: *responsesErr404
<<: *responsesErr405
<<: *responsesErr406
200:
description: Ok
schema: *ApiFee
We might want to add integration tests to check that:
BYRON_MIGRATE_03).> 0 (similar to BYRON_CALCULATE_01).BYRON_CALCULATE_02).BYRON_CALCULATE_03).BYRON_CALCULATE_04).@KtorZ I've added a question regarding the original requirement here: https://jira.iohk.io/browse/WB-32?focusedCommentId=11089&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-11089
(The question is aimed at clarifying whether or not this endpoint should really be an HTTP GET operation, or whether the endpoint really does require a user-supplied payload, in which case we will indeed need a POST operation.)
Few more tests would be handy on negative cases side of things. Also there is no assertion check for the 200 http status code for most basic fee request.
Fee estimation also does not show correct amount -> https://github.com/input-output-hk/cardano-wallet/issues/1150 (the amount does not correspond with genesis.yaml parameters -> some more info also here https://input-output-rnd.slack.com/archives/GBT05825V/p1575876039070100)
Few more tests would be handy on negative cases side of things
@piotr-iohk what kind of negative tests would you like to see? There are already three
@piotr-iohk what kind of negative tests would you like to see? There are already three
They are good indeed!
Just added 2 more to test against 405 and 406 -> #1170.
ok.
Most helpful comment
We might want to add integration tests to check that:
BYRON_MIGRATE_03).> 0(similar toBYRON_CALCULATE_01).BYRON_CALCULATE_02).BYRON_CALCULATE_03).BYRON_CALCULATE_04).