Skip to content

Commit

Permalink
Merge #3598
Browse files Browse the repository at this point in the history
3598: Refactor: break down ApiConstructTransactionData validation r=Unisay a=Unisay

This PR is an increment towards the state where `Cardano.Wallet.Api.createTransaction` API request body validation is modular and is done in a spirit of [Parse, don’t validate](https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/).

I intend to continue down this road, such that:
- API layer is responsible for converting HTTP request into a data type that captures a transaction construction task (`TransactionCtx` atm). 

- `TransactionCtx` is passed to the `Cardano.Wallet.createTransaction` layer which takes care of the semantic validations and does all the logic.

Such refactoring will make it possible to reimplement e.g. `quitStakePool` in terms of the `Cardano.Wallet.createTransaction`.

### Issue Number

ADP-2267

Co-authored-by: Yura Lazarev <[email protected]>
  • Loading branch information
iohk-bors[bot] and Unisay authored Nov 23, 2022
2 parents ab1cfe9 + a927c62 commit 956fa1f
Showing 1 changed file with 148 additions and 122 deletions.
Loading

0 comments on commit 956fa1f

Please sign in to comment.