Skip to content

Commit

Permalink
Adding requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
erdimaden committed Jun 6, 2024
1 parent ca96717 commit 24b84c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/coinbase/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class Transaction {
}

/**
* Returns the status of the Transaction.
* Returns the Status of the Transaction.
*
* @returns The Status
*/
Expand All @@ -60,27 +60,27 @@ export class Transaction {
}

/**
* Returns the from address for the Transaction.
* Returns the From Address ID for the Transaction.
*
* @returns The from address
* @returns The From Address ID
*/
fromAddressId(): string {
return this.model.from_address_id;
}

/**
* Returns whether the Transaction is in a terminal state.
* Returns whether the Transaction is in a terminal State.
*
* @returns Whether the Transaction is in a terminal state
* @returns Whether the Transaction is in a terminal State
*/
isTerminalState(): boolean {
return this.getStatus() in [TransactionStatus.COMPLETE, TransactionStatus.FAILED];
}

/**
* Returns the link to the transaction on the blockchain explorer.
* Returns the link to the Transaction on the blockchain explorer.
*
* @returns The link to the transaction on the blockchain explorer
* @returns The link to the Transaction on the blockchain explorer
*/
getTransactionLink(): string {
// TODO: Parameterize this by Network.
Expand All @@ -90,8 +90,8 @@ export class Transaction {
/**
* Returns the underlying raw transaction.
*
* @throws {InvalidUnsignedPayload} If the payload is invalid.
* @returns The raw transaction
* @throws {InvalidUnsignedPayload} If the Unsigned Payload is invalid.
* @returns The ethers.js Transaction object
*/
rawTransaction(): ethers.Transaction {
if (this.raw) {
Expand Down
6 changes: 3 additions & 3 deletions src/coinbase/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ export function destinationToAddressHexString(destination: Destination): string
}

/**
* Parses an unsigned payload and returns the JSON object.
* Parses an Unsigned Payload and returns the JSON object.
*
* @throws {InvalidUnsignedPayload} If the payload is invalid.
* @param payload - The unsigned payload.
* @throws {InvalidUnsignedPayload} If the Unsigned Payload is invalid.
* @param payload - The Unsigned Payload.
* @returns The parsed JSON object.
*/
export function parseUnsignedPayload(payload: string): Record<string, any> {
Expand Down

0 comments on commit 24b84c6

Please sign in to comment.