Skip to content

Available Balance Mismatch Due to Locked Storage #19

@AlexKushnir1

Description

@AlexKushnir1

The available account balance currently does not match the default balance because a part of the total funds is automatically locked for storage usage. As a result, the computed available balance is less than the expected default value
This confusion appears since users expect the available balance to initially equal the default balance.
I catch this in next test, where preveously was test.near account with pre-locked amount of Near:
https://github.com/near/near-api-js/blob/7fe82aab022525f6ecbce6f270070f6760b0979b/e2e/tests/accounts.test.ts#L37-L40

I suggest to add locked_balance with default zero value and set to sandbox account with some amount.

I could work on it!
cc: @akorchyn @frol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions