Open
Conversation
kiseln
approved these changes
May 9, 2024
| /// * A `U128` value representing the amount that was withdrawn, or `0` if the promise was not | ||
| /// successful and the funds were returned to the user's balance. | ||
| #[private] | ||
| pub fn withdraw_callback( |
There was a problem hiding this comment.
I think this function also needs to be removed from FastBridgeInterface
olga24912
approved these changes
May 9, 2024
| if let Some(msg) = msg { | ||
| self.call_ft_transfer_call(token_id, amount, sender_id, recipient_id, msg) | ||
| ext_token::ext(token_id) | ||
| .with_static_gas(utils::tera_gas(50)) |
Contributor
There was a problem hiding this comment.
Use const for provided gas
| self.call_ft_transfer_call(token_id, amount, sender_id, recipient_id, msg) | ||
| ext_token::ext(token_id) | ||
| .with_static_gas(utils::tera_gas(50)) | ||
| .with_attached_deposit(1) |
| ext_token::ext(token_id) | ||
| .with_static_gas(utils::tera_gas(5)) | ||
| .with_attached_deposit(1) | ||
| .ft_transfer(recipient_id, amount, memo) |
Contributor
There was a problem hiding this comment.
we also should emit FastBridgeWithdrawEvent
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.
The refund for the
ft_transfer_callthat has been introduced in this PR led to additional vulnerabilities, so we decided to remove this feature of auto refund.