New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PLT-6847 withdraw by payout #694
Conversation
WithdrawConstraintError err -> ApiError (show err) "ConstraintError" Null case err of | ||
MintingUtxoNotFound _ -> 400 | ||
RoleTokenNotFound _ -> 400 | ||
PayoutNotFound _ -> 400 | ||
CoinSelectionFailed _ -> 400 | ||
_ -> 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this change make error reporting less expressive? The error reports were already too terse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't make it less expressive, it actually makes it more expressive:
-- before on "PayoutInputNotFound"
ApiError "Internal error" "PayoutInputNotFound" Null 500
-- after
ApiError "PayoutNotFound <payout tx in>" "ConstraintError" 500
- BREAKING `Withdraw` now accepts a set of payout tx outs instead of a contract | ||
ID and a role token. The old behaviour can be emulated via a query to fetch | ||
unclaimed payouts for a contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have to revise some starter-kit lessons prior to releasing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I haven't done ad-hoc testing on chain. I assume that @nhenin will do that as he uses the new API.
4ce99d6
to
13cc2c4
Compare
Withdraw
now accepts payout tx out refs instead of contact ID + token namePayout
schema changed to align with other entities and provide more consistent interface (thanks @nhenin)PayoutRef
renamed toPayoutHeader
payoutId
vspayout
AssetId
forrole
field instead of two fieldsPre-submit checklist: