blockchain-http icon indicating copy to clipboard operation
blockchain-http copied to clipboard

Memo field not included in incoming payment transactions for the account activity endpoint

Open Bogardo opened this issue 2 years ago • 2 comments

When making a request to the /v1/accounts/:address/activity endpoint to fetch all payment_v1 and payment_v2 transactions the memo field is not included for incoming payments.

Example

Get the activity for the address: 13iupFgtU2HKy9Yndfq58CfBvzNFqGuVrEid1G3QWAMhBTjf1R1 This should return all (paged) activity, which includes the following two transactions. One is an incoming payment, the other is an outgoing payment.

GET https://api.helium.io/v1/accounts/13iupFgtU2HKy9Yndfq58CfBvzNFqGuVrEid1G3QWAMhBTjf1R1/activity

[...]
{
  "type": "payment_v2",
  "time": 1629188717,
  "payments": [
    {
      "payee": "13iupFgtU2HKy9Yndfq58CfBvzNFqGuVrEid1G3QWAMhBTjf1R1",
      "amount": 26000000
    }
  ],
  "payer": "14EetsKJNpkmRwcnkh8Fv5zCJSAtT7uQ9caTfyU7nkvzb6bduSP",
  "nonce": 2,
  "height": 969077,
  "hash": "jUK1v3QYF-KlxV8vOm75LOttvnN4wXJm9Kd9xYTRXPA",
  "fee": 35000
},
{
  "type": "payment_v2",
  "time": 1629185729,
  "payments": [
    {
      "payee": "13F7MMBSBWFwn8a1NWLYUurqdrkudbSr6qWR5WWt6j5Hs1UsJGz",
      "memo": "RVRMAAAAAAA=",
      "amount": 1200000000
    }
  ],
  "payer": "13iupFgtU2HKy9Yndfq58CfBvzNFqGuVrEid1G3QWAMhBTjf1R1",
  "nonce": 1,
  "height": 969023,
  "hash": "_liYpG3KNIw7hCR5ZKcPCcBwww3b_XdTq4UmmiUJ0hs",
  "fee": 35000
},
[...]

You can see that the outgoing payment includes a memo, and the incoming payment does not.

When you fetch both of these transactions from the /v1/transactions/:hash endpoint you can see that they both include a memo field.

Incoming payment

GET  https://api.helium.io/v1/transactions/jUK1v3QYF-KlxV8vOm75LOttvnN4wXJm9Kd9xYTRXPA

{
  "data": {
    "type": "payment_v2",
    "time": 1629188717,
    "payments": [
      {
        "payee": "13iupFgtU2HKy9Yndfq58CfBvzNFqGuVrEid1G3QWAMhBTjf1R1",
        "memo": "aG90c2JvdAA=",
        "amount": 26000000
      }
    ],
    "payer": "14EetsKJNpkmRwcnkh8Fv5zCJSAtT7uQ9caTfyU7nkvzb6bduSP",
    "nonce": 2,
    "height": 969077,
    "hash": "jUK1v3QYF-KlxV8vOm75LOttvnN4wXJm9Kd9xYTRXPA",
    "fee": 35000
  }
}

Outgoing payment

GET https://api.helium.io/v1/transactions/_liYpG3KNIw7hCR5ZKcPCcBwww3b_XdTq4UmmiUJ0hs

{
  "data": {
    "type": "payment_v2",
    "time": 1629185729,
    "payments": [
      {
        "payee": "13F7MMBSBWFwn8a1NWLYUurqdrkudbSr6qWR5WWt6j5Hs1UsJGz",
        "memo": "RVRMAAAAAAA=",
        "amount": 1200000000
      }
    ],
    "payer": "13iupFgtU2HKy9Yndfq58CfBvzNFqGuVrEid1G3QWAMhBTjf1R1",
    "nonce": 1,
    "height": 969023,
    "hash": "_liYpG3KNIw7hCR5ZKcPCcBwww3b_XdTq4UmmiUJ0hs",
    "fee": 35000
  }
}

Bogardo avatar Aug 21 '21 00:08 Bogardo