Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/test-specifications/crypto-service/AccountInfoQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ https://github.com/hashgraph/hedera-protobufs/blob/main/services/response_code.p
| isReceiverSignatureRequired | boolean | If true, no transaction can transfer to this account unless signed by this account's key. |
| expirationTime | string | The time at which this account is set to expire. |
| autoRenewPeriod | string | The duration for expiration time will extend every this many seconds. |
| liveHashes | array | All of the livehashes attached to the account (each livehash contains accountId, hash, keys, duration). |
| liveHashes | array | All of the livehashes attached to the account (each livehash contains accountId, hash, keys, duration). Live hashes are a retired network feature; SDKs that removed the deprecated API omit this field. |
| tokenRelationships | map | All tokens related to this account (map of token IDs to token relationship info including balance, KYC status, freeze status, etc.). |
| accountMemo | string | The memo associated with the account. |
| ownedNfts | string | The number of NFTs owned by this account. |
Expand Down Expand Up @@ -93,7 +93,7 @@ https://github.com/hashgraph/hedera-protobufs/blob/main/services/response_code.p
| 16 | Query account info and verify isReceiverSignatureRequired is true | accountId=<ACCOUNT_WITH_RECEIVER_SIG_REQ> | The account info query succeeds and returns isReceiverSignatureRequired=true | Y |
| 17 | Query account info and verify expirationTime is returned | accountId=<VALID_ACCOUNT_ID> | The account info query succeeds and returns the account expiration timestamp | Y |
| 18 | Query account info and verify autoRenewPeriod is returned | accountId=<VALID_ACCOUNT_ID> | The account info query succeeds and returns the account autoRenewPeriod in seconds | Y |
| 19 | Query account info and verify liveHashes is returned | accountId=<VALID_ACCOUNT_ID> | The account info query succeeds and returns liveHashes array (empty if none) | Y |
| 19 | Query account info and verify liveHashes is returned | accountId=<VALID_ACCOUNT_ID> | The account info query succeeds; SDKs still exposing the retired live hash API return a liveHashes array (empty if none), other SDKs omit the field | Y |
| 20 | Query account info and verify tokenRelationships is returned | accountId=<VALID_ACCOUNT_ID> | The account info query succeeds and returns tokenRelationships map (empty if none) | Y |
| 21 | Query account info and verify tokenRelationships with tokens | accountId=<ACCOUNT_WITH_TOKENS> | The account info query succeeds and returns tokenRelationships with token data | Y |
| 22 | Query account info and verify accountMemo is returned | accountId=<VALID_ACCOUNT_ID> | The account info query succeeds and returns accountMemo (empty if not set) | Y |
Expand Down
8 changes: 6 additions & 2 deletions src/tests/crypto-service/test-account-info-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ describe("AccountInfoQuery", function () {
});

it("(#19) Query account info and verify liveHashes is returned", async function () {
// Live hashes are a retired network feature. SDKs that removed the
// deprecated live hash API (e.g. JS SDK >= 2.87.0) omit the field from
// the response; SDKs that still expose it must return an array.
const accountPrivateKey = await generateEd25519PrivateKey(this);
const accountResponse = await JSONRPCRequest(this, "createAccount", {
key: accountPrivateKey,
Expand All @@ -349,8 +352,9 @@ describe("AccountInfoQuery", function () {
accountId: accountId,
});

expect(response).to.have.property("liveHashes");
expect(response.liveHashes).to.be.an("array");
if ("liveHashes" in response) {
expect(response.liveHashes).to.be.an("array");
}
});

it("(#20) Query account info and verify tokenRelationships is returned", async function () {
Expand Down
Loading