Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tm2): implement custom encoding/json marshaler on crypto.Address (…
…gnolang#2756) Currently, on any `sdk.Message`, when doing a json.Marshal, the result look like: ```json {"amount": [{"denom": "ugnot", "amount": 10000000}], "to_address": [109, 116, 186, 231, 239, 107, 120, 148, 194, 146, 166, 150, 161, 244, 93, 201, 25, 61, 216, 223], "from_address": [70, 139, 48, 165, 116, 79, 88, 170, 84, 108, 231, 73, 227, 127, 127, 98, 252, 214, 167, 152]} ``` Now it's returning ```json {"from_address":"g1g69npft5fav254rvuay7xlmlvt7ddfucgvx8xf","to_address":"g1d46t4el0dduffs5j56t2razaeyvnmkxlduduuw","amount":[{"denom":"ugnot","amount":10000000}]} ``` This is already done for amino Marshalling, it's not for json. --------- Co-authored-by: Morgan Bazalgette <[email protected]>
- Loading branch information