Skip to content

Assert stake item stage in response handler #52

@Overseven

Description

@Overseven

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)?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    CosmWasmbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions