Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60bbf69999
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| accountCreationMode === 2 // FromDonationBox: includes activation signature | ||
| ? ethers.utils.defaultAbiCoder.encode(["address", "uint32", "bytes"], [account, destinationDex, actionData]) |
There was a problem hiding this comment.
Compare accountCreationMode using BigNumber semantics
In depositToHypercore, the FromDonationBox branch is gated by accountCreationMode === 2, but createHyperCoreAccountIfNotExists passes hookData.accountCreationMode from decodeCctpV2HookData, which is sourced from ethers.utils.defaultAbiCoder.decode without numeric normalization. In ethers v5 this value is a BigNumber-like object, so strict equality to a JS number does not match; the code then encodes message without actionData, producing an invalid payload for donation-box account creation flows. Convert decoded uint fields to numbers at decode time (or use BigNumber .eq(2) here).
Useful? React with 👍 / 👎.
Closes ACB-318