Function try_handle_stake_response can be called for stake_item with action_stage != StakeActionStage::Execute.
We should add stake item stage assertion.
|
if stake_response.status == Status::Success { |
|
// update stake stats |
|
stake_stats.pending_stake -= Uint256::from(stake_amount); |
|
stake_stats.lp_token_amount += Uint256::from(stake_response.lp_token_amount); |
|
|
|
STAKE_STATS.save(deps.storage, &token_denom, &stake_stats)?; |
Function
try_handle_stake_responsecan be called forstake_itemwithaction_stage != StakeActionStage::Execute.We should add stake item stage assertion.
warden-yield/cosmwasm/contracts/yield-ward/src/execute/response_stake.rs
Lines 33 to 38 in db2f825