Repository navigation
fix(wasm-solana): reject negative intent amounts - #405
Draft
ralph-bitgo[bot] wants to merge 1 commit into
Draft
ralph-bitgo[bot] wants to merge 1 commit into
ralph-bitgo[bot] wants to merge 1 commit into
Conversation
Reject negative values for primary amounts and scope the existing over-balance sentinel to remainingStakingAmount. This prevents invalid unstake requests from selecting full stake deactivation while preserving the supported service response. Ticket: WCN-1881 Session-Id: 6a8cee27-919e-42f4-9f03-1dc548525829 Task-Id: e5de3751-6895-436b-8c68-65394f7dd294
ralph-bitgo
Bot
force-pushed
the
wcn-1881-reject-negative-solana-amounts
branch
from
September 24, 2026 21:52
14702f8 to
f62024d
Compare
This branch has not been deployed
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.
What
remainingStakingAmounthandling field-specific as anExceedsBalancestate, preserving full-deactivation compatibility.BigInt, number, and string amounts; retain zero and positive split coverage.
Why
unstake to build as full stake deactivation. Rejecting them prevents that
operation substitution while preserving the supported over-balance response.
Test plan
git diff --check(passed)cargo test --manifest-path packages/wasm-solana/Cargo.toml— blocked;Cargo is unavailable in this workspace (the prior attempt exited 127).
npm run build --prefix packages/wasm-solanaandnpm test --prefix packages/wasm-solana— blocked; Node is unavailable,and the integration tests import generated
dist/cjsWASM output.Ticket: WCN-1881