Skip to content
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

Fungible contract ft_on_transfer refunds user if output value is PromiseOrValue::Promise #988

Open
jorgeantonio21 opened this issue Dec 2, 2022 · 0 comments

Comments

@jorgeantonio21
Copy link

With the current signature of ft_on_transfer, every time a contract implementation of this method returns a PromiseOrValue::Promise, the latter call on ft_resolve_transfer refunds a user with the total amount that was sent to the given contract. This behavior is implicit and misleading, and it would be more explicit to enforce ft_on_transfer to return a type like U128. Moreover, the current documentation does not address this scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant