Skip to content

Commit

Permalink
Add docs to methods
Browse files Browse the repository at this point in the history
Signed-off-by: Wetitpig <[email protected]>
  • Loading branch information
Wetitpig committed Dec 9, 2024
1 parent 2cfaa1c commit 3aae108
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,25 @@ public TransactionAdapter(final @Nonnull TransactionWithMetadata transactionWith
this.transactionWithMetadata = transactionWithMetadata;
}

/**
* Constructs a new TransactionAdapter object with receipt.
*
* @param transactionWithMetadata the TransactionWithMetadata object to adapt.
* @param transactionReceiptWithMetadata the TransactionReceiptWithMetadata object to adapt.
*/
public TransactionAdapter(
final @Nonnull TransactionWithMetadata transactionWithMetadata,
final @Nullable TransactionReceiptWithMetadata transactionReceiptWithMetadata) {
this.transactionWithMetadata = transactionWithMetadata;
this.transactionReceiptWithMetadata = Optional.ofNullable(transactionReceiptWithMetadata);
}

/**
* Reurns the receipt of the transaction.
*
* @param environment the data fetching environment.
* @return the receipt of the transaction.
*/
private Optional<TransactionReceiptWithMetadata> getReceipt(
final DataFetchingEnvironment environment) {
if (transactionReceiptWithMetadata == null) {
Expand Down

0 comments on commit 3aae108

Please sign in to comment.