Skip to content

[p2][LCD]Encounter incorrect return while trying to set an empty address for "/distribution/{address}/rewards" #1495

@shilei-wang

Description

@shilei-wang

Describe the bug
It seems the system fail to handle the condition in which the address input is empty.

Since the iriscli and swagger will both intercept empty address input, this bug has never been discovered.

To Reproduce
http://localhost:1317/distribution/""/rewards

The system fails to analysis (“”),and then returns the confused output:


{
  "total": [
    {
      "denom": "iris-atto",
      "amount": "1114165332000000000"
    }
  ],
  "delegations": [
    {
      "validator": "fva19q9utf40ecgsumacxtne7rhs5kl32v6nzk88ke",
      "reward": [
        {
          "denom": "iris-atto",
          "amount": "531869301000000000"
        }
      ]
    },
    {
      "validator": "fva1lwfd8p7nywdxm4xyn8dafe8uhu7w39ap0v4csz",
      "reward": [
        {
          "denom": "iris-atto",
          "amount": "582296031000000000"
        }
      ]
    }
  ],
  "commission": null
}

Metadata

Metadata

Labels

APIbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions