From 532d50a0a2c0a5363c4b4533743d65f28730a28c Mon Sep 17 00:00:00 2001 From: Chad Ostrowski <221614+chadoh@users.noreply.github.com> Date: Tue, 17 Nov 2020 14:11:28 -0500 Subject: [PATCH] fix: add v important "more" to error message "LackBalanceForState": "The account {{account_id}} wouldn't have enough balance to cover storage, required to have {{amount}} more" This error gets thrown when you need `amount` MORE tokens. The amount passed in is not the total needed, it is the amount by which you are short. We need the "more"!! Also, the `RentUnpaid` error is no longer thrown by nearcore (it was mostly removed in [050396a] and fully removed in [2622b4f]), so we can remove this error message. [050396a]: https://github.com/near/nearcore/commit/050396a75f70b59531be421be1ad3d5a0d3d8b16 [2622b4f]: https://github.com/near/nearcore/commit/2622b4f902507f9078b8dcf0c5815955c34910a6 --- src/res/error_messages.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/res/error_messages.json b/src/res/error_messages.json index 1124a1e738..29966b93d7 100644 --- a/src/res/error_messages.json +++ b/src/res/error_messages.json @@ -36,8 +36,7 @@ "LinkError": "Wasm contract link error: {{msg}}", "InvalidPublicKey": "VM Logic provided an invalid public key", "ActorNoPermission": "Actor {{actor_id}} doesn't have permission to account {{account_id}} to complete the action", - "RentUnpaid": "The account {{account_id}} wouldn't have enough balance to pay required rent {{amount}}", - "LackBalanceForState": "The account {{account_id}} wouldn't have enough balance to cover storage, required to have {{amount}}", + "LackBalanceForState": "The account {{account_id}} wouldn't have enough balance to cover storage, required to have {{amount}} more", "ReceiverMismatch": "Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.", "CostOverflow": "Transaction gas or balance cost is too high", "InvalidSignature": "Transaction is not signed with the given public key",