ripple / rippled-historical-database

SQL database as a canonical source of historical data
99 stars 68 forks source link

reports endpoint giving wrong results #206

Open saurabhdaga-merkle opened 4 years ago

saurabhdaga-merkle commented 4 years ago

https://xrpl.org/data-api-v2-tool.html#get-daily-reports

2013-01-25T00:00:00Z
?
accounts=true&payments=true

The results for address:

 {
      "account": "rp1Ve83fKy5XbNMkaNmkEbgRp4HJhuKoX3",
      "date": "2013-01-25T00:00:00Z",
      "high_value_received": "1000",
      "high_value_sent": "0",
      "payments": [
        {
          "tx_hash": "B18BA111B438EA9AAEE416C430C5141E93B0B43725AEB4F278996520B61953A1",
          "amount": "2",
          "issuer": "rp1Ve83fKy5XbNMkaNmkEbgRp4HJhuKoX3",
          "type": "received"
        },
        {
          "tx_hash": "049DC2035178864E6D3360A53D2CC8A4B5E17711BD729CE964D63587DDF8AEF4",
          "amount": "2",
          "issuer": "rp1Ve83fKy5XbNMkaNmkEbgRp4HJhuKoX3",
          "type": "sent"
        },
        {
          "tx_hash": "25B02E0BA85D471BE3E1576BAD01FD3EBB51482EDCC4319688E99A77067AA458",
          "amount": "1",
          "issuer": "rp1Ve83fKy5XbNMkaNmkEbgRp4HJhuKoX3",
          "type": "sent"
        },
        {
          "tx_hash": "2DF1C6299709D5BB13FF3C298E89FE61A09D3A4B692F93002E36CC26BFF8860B",
          "amount": "1000",
          "type": "sent"
        }
      ],
      "payments_received": 4,
      "payments_sent": 0,
      "receiving_counterparties": [
        "rGJ3MKc1mdQFt1RU8g7FzbajaXpbmjVYJ"
      ],
      "sending_counterparties": [
        "rGJ3MKc1mdQFt1RU8g7FzbajaXpbmjVYJ"
      ],
      "total_value": "1000",
      "total_value_received": "1000",
      "total_value_sent": "0"
    },

The actual transaction history is https://xrpscan.com/account/rp1Ve83fKy5XbNMkaNmkEbgRp4HJhuKoX3 for 2DF1C6299709D5BB13FF3C298E89FE61A09D3A4B692F93002E36CC26BFF8860B tx_hash. the amount was sent from rp1Ve83fKy5XbNMkaNmkEbgRp4HJhuKoX3 but it is in the received side.

I am seeing this error in many more addresses

saurabhdaga-merkle commented 4 years ago

is the intended results supposed to only show XRP payments ?

gnurag commented 4 years ago

The payments array should include both XRP and IOUs. The payment 049DC2035178864E6D3360A53D2CC8A4B5E17711BD729CE964D63587DDF8AEF4 is infact a 2 EUR.rGJ3MKc1mdQFt1RU8g7FzbajaXpbmjVYJ payment.

saurabhdaga-merkle commented 4 years ago

the problem is with 2DF1C6299709D5BB13FF3C298E89FE61A09D3A4B692F93002E36CC26BFF8860B tx_hash

gnurag commented 4 years ago

Are you referring to the "high_value_received": "1000", and "total_value_received": "1000", properties? That does look like something that should be on the *_value_sent side.