Skip to content

Commit

Permalink
Merge pull request #53 from trustenterprises/feature/consensus-messag…
Browse files Browse the repository at this point in the history
…e-seq-return

Message seq with mirrornode link to data.
  • Loading branch information
mattsmithies committed Jul 20, 2024
2 parents 3caad27 + 8b20058 commit 349bea3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/hashgraph/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,17 @@ class HashgraphClient extends HashgraphClientContract {
.setMaxTransactionFee(new Hbar(100, HbarUnit.Hbar))
.execute(client)

await transaction.getReceipt(client)
const receipt = await transaction.getReceipt(client)
const topicSequenceNumber = receipt.topicSequenceNumber.toString()

// Remember to allow for mainnet links for explorer
const messageTransactionResponse = {
reference,
topic_id,
topicSequenceNumber,
transaction_id: transaction.transactionId.toString(),
explorer_url: Explorer.getExplorerUrl(transaction.transactionId)
explorer_url: Explorer.getExplorerUrl(transaction.transactionId),
mirror_node_query: `${Config.mirrornodeUrl}/api/v1/topics/${topic_id}/messages/${topicSequenceNumber}`
}

return messageTransactionResponse
Expand Down

0 comments on commit 349bea3

Please sign in to comment.