Fix: Refund failed FT deposits#253
Merged
jbencin merged 5 commits intohirosystems:masterfrom Apr 13, 2023
Merged
Conversation
…ent()` so that can handle fungible tokens also
Codecov Report
@@ Coverage Diff @@
## master #253 +/- ##
=======================================
Coverage 93.47% 93.47%
=======================================
Files 6 6
Lines 337 337
=======================================
Hits 315 315
Misses 22 22 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
…cargo test` running multiple tests based on substring matching
ded7eeb to
202e580
Compare
obycode
suggested changes
Apr 13, 2023
Contributor
obycode
left a comment
There was a problem hiding this comment.
Just a few minor comments. Looks great!
jbencin
added a commit
to jbencin/stacks-subnets
that referenced
this pull request
Apr 13, 2023
Contributor
Author
|
Just made all the changes requested, except removing the |
8369a9e to
b32b7eb
Compare
obycode
approved these changes
Apr 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
If a fungible token deposit onto a subnet fails, create a withdrawal transaction to allow the user to withdraw it from the contract
Applicable issues
Additional info (benefits, drawbacks, caveats)
There is no attempt here to handle the case of a partial success (for example, a user deposits 50 tokens and only 20 appear on the subnet). This shouldn't happen, and if it does I would think it indicates a problem with the Clarity contract.
Should I move
make_withdrawal_event()out of blocks.rs and into clarity_vm/withrdawal.rs?Also including a couple minor fixes, see commit messages for details.
Checklist
docs/rpc/openapi.yamlandrpc-endpoints.mdfor v2 endpoints,event-dispatcher.mdfor new events)clarity-benchmarkingrepobitcoin-tests.yml