Skip to content

Commit

Permalink
Set entity ids on a few more tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nana-EC <56320167+Nana-EC@users.noreply.github.com>
  • Loading branch information
Nana-EC committed Apr 1, 2021
1 parent 2a7cfe4 commit ad6f6eb
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 37 deletions.
4 changes: 2 additions & 2 deletions hedera-mirror-rest/__tests__/integrationDomainOps.js
Expand Up @@ -236,7 +236,7 @@ const addTransaction = async (transaction) => {

const payerAccount = EntityId.fromString(transaction.payerAccountId);
const nodeAccount = EntityId.fromString(transaction.nodeAccountId, 'nodeAccountId', true);
const entityAccount = EntityId.fromString(transaction.entity_id, 'entity_id', true);
const entityId = EntityId.fromString(transaction.entity_id, 'entity_id', true);
await sqlConnection.query(
`INSERT INTO transaction (consensus_ns, valid_start_ns, payer_account_id, node_account_id, result, type,
valid_duration_seconds, max_fee, charged_tx_fee, transaction_hash, scheduled, entity_id)
Expand All @@ -253,7 +253,7 @@ const addTransaction = async (transaction) => {
transaction.charged_tx_fee,
transaction.transaction_hash,
transaction.scheduled,
entityAccount.getEncodedId(),
entityId.getEncodedId(),
]
);
await insertTransfers('crypto_transfer', transaction.consensus_timestamp, transaction.transfers);
Expand Down
Expand Up @@ -65,22 +65,25 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779555711927001",
"name": "TOKENCREATION",
"type": "29"
"type": "29",
"entity_id": "0.0.90000"
},
{
"payerAccountId": "0.0.9",
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1234567890000000005",
"name": "CRYPTODELETE",
"type": "12"
"type": "12",
"entity_id": "0.0.117"
},
{
"charged_tx_fee": 0,
"payerAccountId": "0.0.9",
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1234567890000000015",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.7"
}
],
"cryptotransfers": [
Expand Down
Expand Up @@ -65,22 +65,25 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779555711927001",
"name": "TOKENCREATION",
"type": "29"
"type": "29",
"entity_id": "0.0.90000"
},
{
"payerAccountId": "0.0.9",
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1234567890000000005",
"name": "CRYPTODELETE",
"type": "12"
"type": "12",
"entity_id": "0.0.7"
},
{
"charged_tx_fee": 0,
"payerAccountId": "0.0.9",
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1234567890000000015",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.8"
}
],
"cryptotransfers": [
Expand Down
Expand Up @@ -26,7 +26,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779444711927001",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.8"
}
],
"cryptotransfers": [
Expand Down
Expand Up @@ -26,7 +26,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779444711927001",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.8"
}
],
"cryptotransfers": [
Expand Down
Expand Up @@ -26,7 +26,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779444711927001",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.8"
}
],
"cryptotransfers": [
Expand Down Expand Up @@ -67,7 +68,7 @@
{
"charged_tx_fee": 0,
"consensus_timestamp": "1565779444.711927001",
"entity_id": null,
"entity_id": "0.0.8",
"max_fee": "33",
"memo_base64": null,
"name": "CRYPTOUPDATEACCOUNT",
Expand Down
Expand Up @@ -26,7 +26,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779444711927001",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.8"
}
],
"cryptotransfers": [
Expand Down
Expand Up @@ -23,7 +23,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1234567890000000008",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.8"
}
],
"cryptotransfers": [
Expand Down
Expand Up @@ -26,7 +26,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779444711927001",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.8"
}
],
"cryptotransfers": [
Expand Down
Expand Up @@ -26,7 +26,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779600711927001",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.8"
}
],
"cryptotransfers": [
Expand Down Expand Up @@ -123,7 +124,7 @@
{
"charged_tx_fee": 0,
"consensus_timestamp": "1565779600.711927001",
"entity_id": null,
"entity_id": "0.0.8",
"max_fee": "33",
"memo_base64": null,
"name": "CRYPTOUPDATEACCOUNT",
Expand Down
Expand Up @@ -26,22 +26,25 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779555711927001",
"name": "TOKENCREATION",
"type": "29"
"type": "29",
"entity_id": "0.0.90000"
},
{
"payerAccountId": "0.0.9",
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779555711927003",
"name": "CRYPTODELETE",
"type": "12"
"type": "12",
"entity_id": "0.0.7"
},
{
"charged_tx_fee": 0,
"payerAccountId": "0.0.8",
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779444711927001",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.10"
}
],
"cryptotransfers": [
Expand Down
Expand Up @@ -23,7 +23,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1234567890999999999",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.9"
}
],
"cryptotransfers": []
Expand All @@ -34,7 +35,7 @@
"transactions": [
{
"consensus_timestamp": "1234567890.999999999",
"entity_id": null,
"entity_id": "0.0.9",
"valid_start_timestamp": "1234567890.999999998",
"charged_tx_fee": 0,
"memo_base64": null,
Expand Down
Expand Up @@ -26,7 +26,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779209711927001",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.8"
}
],
"cryptotransfers": [
Expand Down Expand Up @@ -54,7 +55,7 @@
"transactions": [
{
"consensus_timestamp": "1565779209.711927001",
"entity_id": null,
"entity_id": "0.0.8",
"valid_start_timestamp": "1565779209.711927000",
"charged_tx_fee": 0,
"memo_base64": null,
Expand Down
Expand Up @@ -34,7 +34,8 @@
"account": "0.0.98",
"amount": 1
}
]
],
"entity_id": "0.0.1000"
},
{
"charged_tx_fee": 7,
Expand Down
Expand Up @@ -34,7 +34,8 @@
"account": "0.0.98",
"amount": 1
}
]
],
"entity_id": "0.0.1000"
},
{
"charged_tx_fee": 7,
Expand Down
Expand Up @@ -34,7 +34,8 @@
"account": "0.0.98",
"amount": 1
}
]
],
"entity_id": "0.0.1000"
},
{
"charged_tx_fee": 7,
Expand Down Expand Up @@ -76,7 +77,7 @@
"transactions": [
{
"consensus_timestamp": "1234567890.000000002",
"entity_id": null,
"entity_id": "0.0.1000",
"charged_tx_fee": 7,
"max_fee": "33",
"memo_base64": null,
Expand Down
Expand Up @@ -34,7 +34,8 @@
"account": "0.0.98",
"amount": 1
}
]
],
"entity_id": "0.0.1000"
},
{
"charged_tx_fee": 7,
Expand Down Expand Up @@ -77,7 +78,7 @@
{
"charged_tx_fee": 7,
"consensus_timestamp": "1234567890.000000002",
"entity_id": null,
"entity_id": "0.0.1000",
"max_fee": "33",
"memo_base64": null,
"name": "SCHEDULECREATE",
Expand Down
Expand Up @@ -34,7 +34,8 @@
"account": "0.0.98",
"amount": 1
}
]
],
"entity_id": "0.0.1000"
},
{
"charged_tx_fee": 7,
Expand Down
Expand Up @@ -29,7 +29,8 @@
"nodeAccountId": "0.0.3",
"consensus_timestamp": "1565779444711927001",
"name": "CRYPTOUPDATEACCOUNT",
"type": "15"
"type": "15",
"entity_id": "0.0.11"
}
],
"cryptotransfers": [
Expand Down Expand Up @@ -74,7 +75,7 @@
{
"charged_tx_fee": 0,
"consensus_timestamp": "1565779444.711927001",
"entity_id": null,
"entity_id": "0.0.11",
"max_fee": "33",
"memo_base64": null,
"name": "CRYPTOUPDATEACCOUNT",
Expand Down
Expand Up @@ -33,7 +33,9 @@
"account": "0.0.9",
"amount": -20
}
]
],
"name": "TOKENWIPE",
"entity_id": "0.0.90000"
}
]
},
Expand All @@ -43,7 +45,7 @@
"transactions": [
{
"consensus_timestamp": "1234567890.000000001",
"entity_id": null,
"entity_id": "0.0.90000",
"valid_start_timestamp": "1234567890.000000000",
"charged_tx_fee": 7,
"memo_base64": null,
Expand Down
Expand Up @@ -27,7 +27,9 @@
"account": "0.0.9",
"amount": -20
}
]
],
"name": "TOKENWIPE",
"entity_id": "0.0.90000"
}
]
},
Expand All @@ -37,7 +39,7 @@
"transactions": [
{
"consensus_timestamp": "1234567890.000000001",
"entity_id": null,
"entity_id": "0.0.90000",
"valid_start_timestamp": "1234567890.000000000",
"charged_tx_fee": 7,
"memo_base64": null,
Expand Down

0 comments on commit ad6f6eb

Please sign in to comment.