telescope
telescope copied to clipboard
Can't use lcdClients options
node's lcd wants snake_case, but lcdClients supports camelCase.
According to the issues below, we can get snake_case response by using prototypes.parser.keepCase as true. https://github.com/hyperweb-io/telescope/issues/194
typeUrl of ProtoMsg is defined as type_url, which seems to cause a problem in GlobalDecoderRegistry.register.
Can you share your full configuration, maybe a repository?
You can see this in the fix/lcd branch of the repository here. https://github.com/xpladev/xplajs/tree/fix/lcd
The problem occurs with camel case, as in the example code below. https://github.com/xpladev/xplajs/blob/a8dcfaa924bf6c84df82ab62f25c278ddb849265/libs/xplajs/src/ethermint/types/v1/account.ts#L107-L116
what is the expected output vs. the current output? Which particular area is broken?
First, you can check the json of the script I ran here. https://github.com/xpladev/xplajs/blob/a8dcfaa924bf6c84df82ab62f25c278ddb849265/scripts/xpla.telescope.json#L15-L17
According to the link above, EthAccountProtoMsg should be snake case, but it was generated as camelCase in toProtoMsg.
Expected output
toProtoMsg(message: EthAccount): EthAccountProtoMsg {
return {
type_url: "/ethermint.types.v1.EthAccount",
value: EthAccount.encode(message).finish()
};
}
Current output
toProtoMsg(message: EthAccount): EthAccountProtoMsg {
return {
typeUrl: "/ethermint.types.v1.EthAccount",
value: EthAccount.encode(message).finish()
};
}