Prerequisites
Description
https://github.com/near/near-api-js/blob/master/packages/providers/src/failover-rpc-provider.ts#L98
If a smart contract returns null for example Option then the failover rpc will not detect this as a valid response and cause it to fail
Reproducible demo
No response
Steps to reproduce
Create a smart contract that has a view function that returns null
Create a NAJ script that calls it with a normal JSON RPC provider then with a failover RPC provider
The first will succeed, the second will not
Expected behavior
If it returns null, it should return null instead of failing
Actual behavior
it errors instaed of returning null
Your environment
Self-service
Prerequisites
near-api-js.Description
https://github.com/near/near-api-js/blob/master/packages/providers/src/failover-rpc-provider.ts#L98
If a smart contract returns null for example Option then the failover rpc will not detect this as a valid response and cause it to fail
Reproducible demo
No response
Steps to reproduce
Create a smart contract that has a view function that returns null
Create a NAJ script that calls it with a normal JSON RPC provider then with a failover RPC provider
The first will succeed, the second will not
Expected behavior
If it returns null, it should return null instead of failing
Actual behavior
it errors instaed of returning null
Your environment
Self-service