Skip to content

Stake account should assert on lamport balance #2

@mcintyre94

Description

@mcintyre94

Currently the stake assertions only asserts on authorized withdrawer + staker:

assertions.push({
__kind: 'MetaAssertion',
fields: [
{
__kind: 'AuthorizedWithdrawer',
value: publicKey(simulatedAccount.state.meta.authorized.withdrawer),
operator: EquatableOperator.Equal,
},
],
});
assertions.push({
__kind: 'MetaAssertion',
fields: [
{
__kind: 'AuthorizedStaker',
value: publicKey(simulatedAccount.state.meta.authorized.staker),
operator: EquatableOperator.Equal,
},
],
});

IMO there should also be an assertion on the lamport balance of the stake account (using AssertAccountInfo) to ensure there's not an unexpected withdrawal/expected deposit that doesn't happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions