iotex-analytics icon indicating copy to clipboard operation
iotex-analytics copied to clipboard

Get XRC20 list response incorrect from address

Open nmhung1210 opened this issue 5 years ago • 2 comments

XRC20 query below:

{
  xrc20 {
    byPage(numPerPage: 1, page: 1) {
      xrc20 {
        hash
        from
      }
    }
  }
}

Response:

{
  "data": {
    "xrc20": {
      "byPage": {
        "xrc20": [
          {
            "hash": "efba1bbc8c462636bf7b215b78e93af13280176b7faa8d195d3e79a563c3fc0c",
            "from": "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7"
          }
        ]
      }
    }
  }
}

Notice that the from address responded by xrc20 query above different than the sender of getActions query below:

{
  getActions(byHash:{
    actionHash:"efba1bbc8c462636bf7b215b78e93af13280176b7faa8d195d3e79a563c3fc0c",
    checkingPending: true
  }) {
    actionInfo{
      action{
        senderPubKey
      }
    }
  }
}
{
  "data": {
    "getActions": {
      "actionInfo": [
        {
          "action": {
            "senderPubKey": "047d074077e67fcb453f6fabe176fc965cceed5cb2b7c6ab8a96ece76aea45863bd43bfbe00a083f459dfb651828e22832f63fa5a866226f681e03797cc5b4c078"
          }
        }
      ]
    }
  }
}

The address of senderPubKey is io1662u74jec8y5qvy375twzgerf9mqut526urc9z

nmhung1210 avatar Oct 02 '19 02:10 nmhung1210

"senderPubKey" is signer's address,"from" is the actual transfer address in contract, actual transfer happend in between "from" and "to"

coderbradlee avatar Oct 02 '19 06:10 coderbradlee

"senderPubKey" is signer's address,"from" is the actual transfer address in contract, actual transfer happend in between "from" and "to"

Can we have the signer's address added to an xrc20 record? Because users might be confused if they are the one signed an xrc20 transfer but that transfer actually came from another address.

nmhung1210 avatar Oct 03 '19 06:10 nmhung1210