I was doing QA and code review and noticed that when you type in mike.near to the Account Lookup it will not get through all the list of validators, and a console error will appear.
This is not your fault, but a bug that we discovered.
I think fixing this bug will help the team understand how NEAR works.
Error: Querying call/aurora.pool.near/get_account_total_balance failed: wasm execution failed with error: FunctionCallError(HostError(GuestPanic { panic_msg: "panicked at 'Failed to deserialize input from JSON.: Error(\"the account ID is invalid\", line: 1, column: 83)', staking-farm/src/views.rs:69:1" })).
{
"error": "wasm execution failed with error: FunctionCallError(HostError(GuestPanic { panic_msg: \"panicked at 'Failed to deserialize input from JSON.: Error(\\"the account ID is invalid\\", line: 1, column: 83)', staking-farm/src/views.rs:69:1\" }))",
"logs": [],
"block_height": 57351511,
"block_hash": "FzAWmPtZcnqZpMAjbTyRPjZU7iwPSB2jowsXx5tKvAej"
}
This is because the smart contract on aurora.pool.near is slightly different and checks to see if a valid NEAR name was given as an argument.The problem is:the old contracts didn't check for a valid account name, and this javascript tool was sending the account ID of 71ed549b49566eeb37cdb70e18f2f23800fc1496.lockup.near doesn't exist as an account. Obviously the doesn't exist text is invalid.I think the fix will be around here:https://github.com/near-projects/account-lookup/blob/5426914b2258946d51f0166d721c9498bbc3e787/script.js#L338-L339
I was doing QA and code review and noticed that when you type in mike.near to the Account Lookup it will not get through all the list of validators, and a console error will appear.
https://near.github.io/account-lookup/#mike.near
This is in relation to the frontend task here:
https://github.com/near-projects/account-lookup
This is not your fault, but a bug that we discovered.
I think fixing this bug will help the team understand how NEAR works.
Error: Querying call/aurora.pool.near/get_account_total_balance failed: wasm execution failed with error: FunctionCallError(HostError(GuestPanic { panic_msg: "panicked at 'Failed to deserialize input from JSON.: Error(\"the account ID is invalid\", line: 1, column: 83)', staking-farm/src/views.rs:69:1" })). { "error": "wasm execution failed with error: FunctionCallError(HostError(GuestPanic { panic_msg: \"panicked at 'Failed to deserialize input from JSON.: Error(\\"the account ID is invalid\\", line: 1, column: 83)', staking-farm/src/views.rs:69:1\" }))", "logs": [], "block_height": 57351511, "block_hash": "FzAWmPtZcnqZpMAjbTyRPjZU7iwPSB2jowsXx5tKvAej" }
This is because the smart contract on aurora.pool.near is slightly different and checks to see if a valid NEAR name was given as an argument.The problem is:the old contracts didn't check for a valid account name, and this javascript tool was sending the account ID of 71ed549b49566eeb37cdb70e18f2f23800fc1496.lockup.near doesn't exist as an account. Obviously the doesn't exist text is invalid.I think the fix will be around here:https://github.com/near-projects/account-lookup/blob/5426914b2258946d51f0166d721c9498bbc3e787/script.js#L338-L339
where the lockupAccountId is being set incorrectly to include the words “doesn’t exist”If you need to check if it exists or not, you can look at the cookbook recipe here:https://github.com/near/near-api-js/blob/master/examples/cookbook/utils/check-account-existence.js