Telegram: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
StreamContract::withdraw in contracts/stream_contract/src/lib.rs checks the same condition twice in a row:
Self::validate_stream_active(&stream)?;
if stream.paused {
return Err(StreamError::StreamInactive);
}
if stream.paused {
return Err(StreamError::StreamInactive);
}
The second if stream.paused block (lines ~436-438) is dead, unreachable duplicate code. It does no harm functionally but is confusing and slightly bloats the compiled WASM. Removing it improves readability.
Acceptance criteria
Files to touch
contracts/stream_contract/src/lib.rs (the withdraw function, ~lines 431-438)
Out of scope
- Any change to pause/withdraw semantics — this is a pure dead-code removal.
Telegram: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
StreamContract::withdrawincontracts/stream_contract/src/lib.rschecks the same condition twice in a row:The second
if stream.pausedblock (lines ~436-438) is dead, unreachable duplicate code. It does no harm functionally but is confusing and slightly bloats the compiled WASM. Removing it improves readability.Acceptance criteria
if stream.paused { return Err(StreamError::StreamInactive); }block inwithdrawcargo teststill passes (existing paused-withdraw tests cover this path)cargo build --target wasm32-unknown-unknown --releasesucceedsFiles to touch
contracts/stream_contract/src/lib.rs(thewithdrawfunction, ~lines 431-438)Out of scope