Closed olanod closed 2 years ago
I'm thinking to use this as a starting point to do do some refactoring to simplify our API, we can start by first introducing an internal settle_payment(from: AccountId, recipient: AccountId, recipient_share: Percent)
method that is used by some of our existing extrinsics. E.g. cancel
is a settle_payment(from, recipient, Percent::zero())
or release
a settle_payment(from, recipient, Percent::one())
. Later instead of resolve_cancel_payment
and resolve_release_payment
we expose the settle_payment
directly.
Based on a question from @JosephKnecht-lab in his external review, we could consider having a method for dispute resolvers to be able to split resources between the buyer and seller in case the current all-or-nothing approach is not enough.