-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rpc): Fixes getNodeInfo serialisation (#1991)
When calling the RPC server across HTTP, the automagical json-rpc-server serialisation was failing to deserialise the `NodeInfo`. The constructor of the NodeInfo object was not exactly `Object`, so the converter did not go recursively into each field. This PR makes the check for "is something an object" wider, and changes the RPC server test so it reproduces the issue without the fix. Before this change, `getNodeInfo().rollupAddress` was equal to `{ type: 'EthAddress', data: '0x...' }`, so calling `toString()` on it resulted in the string `[object Object]`.
- Loading branch information
1 parent
e07ea1a
commit 0a29fa8
Showing
2 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters