Skip to content

What does the values array for a swap represent #764

@lukechilds

Description

@lukechilds

How exactly should the values array be interpreted?

For the following trade:

{  
   "uuid":"9201125e07d4e8a9a2bd24d7abcbb2872e2d77be0f5aea3c5f2d861b9fbf6c22",
   "expiration":1523438135,
   "tradeid":2450937681,
   "requestid":523815073,
   "quoteid":3270592855,
   "iambob":0,
   "Bgui":"",
   "Agui":"hyperdex",
   "gui":"hyperdex",
   "bob":"CHIPS",
   "srcamount":1.04265855,
   "bobtxfee":0.0001,
   "alice":"KMD",
   "destamount":0.10037849,
   "alicetxfee":0.00001,
   "aliceid":"8164005029987024897",
   "sentflags":[  
      "alicespend",
      "bobpayment",
      "alicepayment",
      "bobdeposit",
      "myfee"
   ],
   "values":[  
      1.04275855,
      0,
      1.04285855,
      0.10039849,
      1.17319086,
      0,
      0.00012918,
      0,
      0,
      0,
      0
   ],
   "result":"success",
   "status":"finished",
   "finishtime":1523422821,
   "bobdeposit":"90c06678b8a59503cc8eb254cc157fd850f69645564b9412aa3452c0790e5ce8",
   "alicepayment":"94298563a9c1b82398339a0c543cc2dbd910ca0b1f412789fd1c1592697f8a8f",
   "bobpayment":"0142c02ced82b83e7759812032684647ff7ca5945c0de52989e2c92465e9972f",
   "paymentspent":"d6f42cc13b1fdf4637459cca68917690e9b60c506a107f108e3d8a383b3006ed",
   "Apaymentspent":"0000000000000000000000000000000000000000000000000000000000000000",
   "depositspent":"0000000000000000000000000000000000000000000000000000000000000000",
   "method":"tradestatus"
}

We have:

[  
  1.04275855,
  0,
  1.04285855,
  0.10039849,
  1.17319086,
  0,
  0.00012918,
  0,
  0,
  0,
  0
]

I'm assuming these relate to the alicespend, bobpayment, alicepayment, bobdeposit and myfee transactions. but how exactly do we correlate them? Why are there zeros in-between? Will a specific index always correlate to specific TX?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions