Skip to content

Commit

Permalink
fix: add v important "more" to error message
Browse files Browse the repository at this point in the history
    "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]: near/nearcore@050396a
  [2622b4f]: near/nearcore@2622b4f
  • Loading branch information
chadoh committed Nov 17, 2020
1 parent 4090eae commit 036cd72
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/res/error_messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}} yoctoNEAR 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",
Expand Down

0 comments on commit 036cd72

Please sign in to comment.