terra-money / fcd-classic

Terra ETL + RestFul API Server
https://fcd.terra.dev/swagger
MIT License
63 stars 42 forks source link

mishandled getAddressFromMsg() #83

Closed kjessec closed 3 years ago

kjessec commented 4 years ago

in getAddressFromMsg(),

    case 'staking/MsgDelegate':
    case 'staking/MsgCreateValidator':
    case 'staking/MsgBeginRedelegate':
    case 'staking/MsgUndelegate':
    case 'distribution/MsgSetWithdrawAddress':
    case 'distribution/MsgWithdrawValidatorCommission':
    case 'distribution/MsgWithdrawDelegationReward': {
      return {
        staking: get(msg, 'value.delegator_address') ? [get(msg, 'value.delegator_address')] : []
      }
    }

the type distribution/MsgWithdrawValidatorCommission doesn't have value.delegator_address. it should rather be value.validator_address.

checked against cosmos-sdk@0.37.14

// msg struct for validator withdraw
type MsgWithdrawValidatorCommission struct {
    ValidatorAddress sdk.ValAddress `json:"validator_address" yaml:"validator_address"`
}