Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhaiwat10 committed Dec 22, 2021
1 parent 2f8ccbb commit a357c2f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/hooks/src/hooks/useTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import React from 'react';

/**
* @dev Hook to get the loading status, error, and data of a function call.
* @param method Function to call
* @param args an array of arguments to pass to the function
* @param method The contract function you want to call
* @param args an array of arguments to pass to the function.
* @returns {
* execute: () => Promise<any>,
* loading: boolean,
* error: null | Error,
* } {
* execute: On calling this method, the function is executed with the passed arguments and the loading status is set to true.
* loading: this is true while the function is executing and will be false when the function has finished executing.,
* error: this will be null when there is no error and in case of error, it will contain the error object.
* execute: Executes the transaction.
* loading: True until the the transaction is confirmed, false otherwise.
* error: Contains the error object if the transaction failed, null otherwise.
* }
*/

Expand Down

0 comments on commit a357c2f

Please sign in to comment.