feat: add toString to TransactionResponse
package com.hedera.hashgraph.sdk;
+import com.google.common.base.MoreObjects;
import java8.util.concurrent.CompletableFuture;
+import org.bouncycastle.util.encoders.Hex;
public final class TransactionResponse implements WithGetReceipt, WithGetRecord {
public final AccountId nodeId;
@@ -24,4 +26,13 @@ public final class TransactionResponse implements WithGetReceipt, WithGetRecord
public CompletableFuture<TransactionRecord> getRecordAsync(Client client) {
return transactionId.getRecordAsync(client);
}
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this)
+ .add("nodeId", nodeId)
+ .add("transactionHash", Hex.toHexString(transactionHash))
+ .add("transactionId", transactionId)
+ .toString();
+ }
}
