allinbits / cosmos-cash

Cosmos Cash
https://docs.cosmos-cash.app.beta.starport.cloud/
Apache License 2.0
36 stars 12 forks source link

Registartion credential serialization error #266

Closed noandrea closed 2 years ago

noandrea commented 2 years ago

Registration credential as described here: https://github.com/allinbits/cosmos-cash/blob/main/docs/Explanation/ADR/adr-005-registration-credential.md

are built using a proto definition:

ma<string, LegalPerson>

the code generation works fine but we get a runtime error:

did:cosmos:net:cash:emti-registration-credential did:cosmos:net:cash:regulator did:cosmos:net:cash:emti \
EU "First Galactic Bank" "FGB" \
--from regulator --chain-id cash -y
code: 2
codespace: sdk
data: ""
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: '"allinbits.cosmoscash.verifiablecredential.RegistrationCredentialSubject.LegalPersonEntry"
  does not implement proto.Message: tx parse error'
timestamp: ""
tx: null
txhash: A18F4DE09C71F67C66D605130305BC9634804DD22B7640E637A43DDF04878364
noandrea commented 2 years ago

I haven't found a solution for the issue. As a workaround instead of using a map we are going to use a list type:

repeated LegalPerson