Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not enough balance error does not get formatted properly #363

Closed
janedegtiareva opened this issue Jul 21, 2020 · 1 comment
Closed

Not enough balance error does not get formatted properly #363

janedegtiareva opened this issue Jul 21, 2020 · 1 comment
Assignees
Labels
bug Something isn't working P1 Very important

Comments

@janedegtiareva
Copy link
Contributor

To repro, from near shell run a near send which exceeds the balance of the sender account.

The observed output is:
Sending 100000000 NEAR to jane3 from jane3.testnet
Error: NotEnoughBalance [Error]: Sender jane3.testnet does not have enough balance {} for operation costing {}
at Object.parseRpcError (C:\Users\janed\near\near-shell\node_modules\near-api-js\lib\utils\rpc_errors.js:38:19)
at JsonRpcProvider.sendJsonRpc (C:\Users\janed\near\near-shell\node_modules\near-api-js\lib\providers\json-rpc-provider.js:146:40)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Account.signAndSendTransaction (C:\Users\janed\near\near-shell\node_modules\near-api-js\lib\account.js:115:22)
at async exports.sendMoney (C:\Users\janed\near\near-shell\index.js:209:20)
at async Object.handler (C:\Users\janed\near\near-shell\utils\exit-on-error.js:37:9) {
type: 'NotEnoughBalance',
balance: '499000000905435533954930000',
cost: '100000000000000002265303009375000',
signer_id: 'jane3.testnet'
}

Desired output is that the "Sender jane3.testnet does not have enough balance {} for operation costing {}" piece is properly formatted.

@chadoh
Copy link
Contributor

chadoh commented Jul 22, 2020

Closed via #364

@chadoh chadoh closed this as completed Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Very important
Projects
None yet
Development

No branches or pull requests

3 participants