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

Convert wormhole payload to borsh #109

Merged
merged 4 commits into from
Nov 11, 2024
Merged

Convert wormhole payload to borsh #109

merged 4 commits into from
Nov 11, 2024

Conversation

kiseln
Copy link
Contributor

@kiseln kiseln commented Nov 8, 2024

No description provided.

@kiseln kiseln requested a review from karim-en November 8, 2024 15:32
@karim-en
Copy link
Collaborator

karim-en commented Nov 9, 2024

@kiseln could you please fix the conflicts

}
#[derive(Debug, BorshDeserialize)]
struct FinTransferWh {
_token: String,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add the type (first byte) to this struct and move the verification to the try_into.
see this #106 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still like verifying inside verify_vaa_callback. We can forget and remove the check inside the conversion methods and introduce a vulnerability this way. However, I don't mind making this check in both places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiseln kiseln marked this pull request as ready for review November 11, 2024 13:52
@karim-en karim-en requested a review from olga24912 November 11, 2024 13:56
@karim-en
Copy link
Collaborator

@kiseln please apply the fmt

@kiseln
Copy link
Contributor Author

kiseln commented Nov 11, 2024

@kiseln please apply the fmt

Done

@karim-en karim-en merged commit f5369a4 into main Nov 11, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants