I've experienced this issue while working on a different PR.
locked_amount does not display the correct result. The amount of near locked for storage is higher than what locked_amount displays. Because of this, self.get_available_amount() which is using locked_amount also does not display the correct result.
If you try to call this from the contract:
Promise::new(account_id).transfer(self.get_available_amount().0) it will fail and it will tell you that if you transfer that amount the contract will not have the necessary NEAR to cover the storage costs.
I've experienced this issue while working on a different PR.
locked_amount
does not display the correct result. The amount of near locked for storage is higher than whatlocked_amount
displays. Because of this,self.get_available_amount()
which is usinglocked_amount
also does not display the correct result.If you try to call this from the contract:
Promise::new(account_id).transfer(self.get_available_amount().0)
it will fail and it will tell you that if you transfer that amount the contract will not have the necessary NEAR to cover the storage costs.