From fa9e1de4dfe3a56677136cb0e1b4587ff9d489b0 Mon Sep 17 00:00:00 2001 From: Chris Clark Date: Wed, 15 Jul 2015 13:57:00 -0700 Subject: [PATCH] Add transaction id to response of getTransaction and getTransactions --- src/api/ledger/parse/transaction.js | 1 + test/fixtures/account-transactions-response.json | 2 ++ test/fixtures/transaction-response.json | 1 + 3 files changed, 4 insertions(+) diff --git a/src/api/ledger/parse/transaction.js b/src/api/ledger/parse/transaction.js index 8b8c9e39..e5e051a7 100644 --- a/src/api/ledger/parse/transaction.js +++ b/src/api/ledger/parse/transaction.js @@ -36,6 +36,7 @@ function parseTransaction(tx: Object): Object { return utils.removeUndefined({ type: type, address: tx.Account, + id: tx.hash, specification: utils.removeUndefined(specification), outcome: outcome ? utils.removeUndefined(outcome) : undefined }); diff --git a/test/fixtures/account-transactions-response.json b/test/fixtures/account-transactions-response.json index b6895701..cd5b65bf 100644 --- a/test/fixtures/account-transactions-response.json +++ b/test/fixtures/account-transactions-response.json @@ -2,6 +2,7 @@ { "type": "payment", "address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", + "id": "4C37C92576DEB000D13B07F4D3F99F968BD86B6B83A840BEFFB2BFC8A042A81B", "specification": { "source": { "address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", @@ -86,6 +87,7 @@ { "type": "payment", "address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", + "id": "4C37C92576DEB000D13B07F4D3F99F968BD86B6B83A840BEFFB2BFC8A042A81B", "specification": { "source": { "address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", diff --git a/test/fixtures/transaction-response.json b/test/fixtures/transaction-response.json index 89d7b2a4..72362e65 100644 --- a/test/fixtures/transaction-response.json +++ b/test/fixtures/transaction-response.json @@ -1,6 +1,7 @@ { "type": "payment", "address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", + "id": "F4AB442A6D4CBB935D66E1DA7309A5FC71C7143ED4049053EC14E3875B0CF9BF", "specification": { "source": { "address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",