Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose includeWatchOnly bool in GetTransaction calls #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@ func (r FutureGetTransactionResult) Receive() (*btcjson.GetTransactionResult, er
// the returned instance.
//
// See GetTransaction for the blocking version and more details.
func (c *Client) GetTransactionAsync(txHash *chainhash.Hash) FutureGetTransactionResult {
func (c *Client) GetTransactionAsync(txHash *chainhash.Hash, includeWatchOnly *bool) FutureGetTransactionResult {
hash := ""
if txHash != nil {
hash = txHash.String()
}

cmd := btcjson.NewGetTransactionCmd(hash, nil)
cmd := btcjson.NewGetTransactionCmd(hash, includeWatchOnly)
return c.sendCmd(cmd)
}

// GetTransaction returns detailed information about a wallet transaction.
//
// See GetRawTransaction to return the raw transaction instead.
func (c *Client) GetTransaction(txHash *chainhash.Hash) (*btcjson.GetTransactionResult, error) {
return c.GetTransactionAsync(txHash).Receive()
func (c *Client) GetTransaction(txHash *chainhash.Hash, includeWatchOnly *bool) (*btcjson.GetTransactionResult, error) {
return c.GetTransactionAsync(txHash, includeWatchOnly).Receive()
}

// FutureListTransactionsResult is a future promise to deliver the result of a
Expand Down