Closed hashedone closed 2 years ago
Tests are missing - it is marked as ready for review to not block other tasks, but I will add tests today (either add into this review, or - if it is already closed - in follow up).
Note from my side: I applied the query to the controller basing on task description, but I am not happy about it. My proposal is, to substitute ControllerQuery::CanTransfer
with
ControllerQuery::TransferableAmount {
token,
account,
}
The change here is to remove amount
at all. The response would be just:
TransferableAmountResp {
transferable: Amount,
}
And then contract would check against the amount it want to transfer. It is the same information basically, but communication protocol is simplified. @ethanfrey ?
That is a good improvement, as it provides more information for the same question.
Feel free to update that in this PR or a follow up, but I accept the api change
Closes #2