MsgUpdateCurator

valid message

Given message

{
  "curator": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38",
  "hash": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf",
  "new_curator": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup"
}

When validate message

Then expect no error.

an error is returned if curator is empty

Given message

{}

When validate message

Then expect the error

curator: empty address string is not allowed: invalid address

an error is returned if curator is not a bech32 address

Given message

{
  "curator": "foo"
}

When validate message

Then expect the error

curator: decoding bech32 failed: invalid bech32 string length 3: invalid address

an error is returned if hash is empty

Given message

{
  "curator": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38"
}

When validate message

Then expect the error

hash: empty string is not allowed: invalid request

an error is returned if hash exceeds 128 characters

Given message

{
  "curator": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38"
}

And hash with length "129"

When validate message

Then expect the error

hash: exceeds max length 128: invalid request

an error is returned if new curator is empty

Given message

{
  "curator": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38",
  "hash": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}

When validate message

Then expect the error

new curator: empty address string is not allowed: invalid address

an error is returned if new curator is not a bech32 address

Given message

{
  "curator": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38",
  "hash": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf",
  "new_curator": "foo"
}

When validate message

Then expect the error

new curator: decoding bech32 failed: invalid bech32 string length 3: invalid address