Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: RawLog of gov vote transaction is not a valid json #16230

Closed
dimiandre opened this issue May 19, 2023 · 0 comments · Fixed by #16231
Closed

[Bug]: RawLog of gov vote transaction is not a valid json #16230

dimiandre opened this issue May 19, 2023 · 0 comments · Fixed by #16231
Labels

Comments

@dimiandre
Copy link
Member

Summary of Bug

If you query for a governance vote transaction, nasted RawLog of the vote option is not a valid json

Example:

https://rest.cosmos.directory/mars/cosmos/tx/v1beta1/txs/EF39B8E606847E89D59B57CFE567AE12A0292690A88C398FD7CB3AF8B3823046

[
   {
      "msg_index":0,
      "events":[
         {
            "type":"message",
            "attributes":[
               {
                  "key":"action",
                  "value":"/cosmos.authz.v1beta1.MsgExec"
               },
               {
                  "key":"module",
                  "value":"governance"
               },
               {
                  "key":"sender",
                  "value":"mars1dx9t70pvn4g9rsyyenxahkh4uw7ph62jdk36e7"
               },
               {
                  "key":"authz_msg_index",
                  "value":"0"
               }
            ]
         },
         {
            "type":"proposal_vote",
            "attributes":[
               {
                  "key":"option",
                  "value":"option:VOTE_OPTION_YES weight:\"1.000000000000000000\""
               },
               {
                  "key":"proposal_id",
                  "value":"89"
               },
               {
                  "key":"authz_msg_index",
                  "value":"0"
               }
            ]
         }
      ]
   }
]

you can see in the key "option", "value" is not a valid json.

 {
    "key":"option",
    "value":"option:VOTE_OPTION_YES weight:\"1.000000000000000000\""
 },

In previous SDK version it was formatted correctly

 {
    "key":"option",
    "value":"{\"option\":1,\"weight\":\"1.000000000000000000\"}"
 }

Version

Mars Mainnet SDK v0.46.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant