fix: bifrost type issue & small fixes in tests #1345
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR includes 3 separate fixes :
isEthereum
in test results1. Bifrost Object Type
Relates to issue #1082
Issue
When connected to
wss://bifrost-rpc.liebi.com/ws
and requesting one of the following blocks2652989
3460065
Sidecar returns the message :
This is because the
delegations
entry have askey
aMultilocation
object and in Sidecar code when we sanitize here we expect a key only of typestring
ornumber
.Suggested Solution
Solution suggested from @hqwangningbo in this comment which checks if the
key
is of typeobject
and makes it astring
. With this change, when requesting one of the affected blocks it returns (e.g. for block5296335
) the object :This result aligns also with what we see in :
delegations
2. Fix in tests by adding
isEthereum
entryAdded the missing entry
isEthereum
in the corresponding json files.3. Fix in jest config
Issue
When running
we are receiving the warning :
Suggested Solution
Removed entry in
globals
source and added it intransform
.Todos
isEthereum
entry