Skip to content

Commit d1bb61e

Browse files
committed
Added comment on why we just return a hash
1 parent 52798f2 commit d1bb61e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/transactions/management/newTransactionWorker.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ export class NewTransactionWorker {
357357

358358
for (const response of this.pendingResponses) {
359359
if (sequenceNumber > response.sequenceNumber) {
360+
// The increased sequence number is enough information to know that the transaction
361+
// was committed to the chain. We return the hash so that the caller can decide
362+
// whether to fetch the UserTransactionResponse or just track.
360363
response.deferred.resolve(response.hash);
361364
this.pendingResponses.delete(response);
362365
} else if (Math.floor(Date.now() / 1000) > response.expirationTimestamp) {

0 commit comments

Comments
 (0)