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

Add referenceID to spend #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package zcashd

import (
"encoding/json"
"io/ioutil"
"net/http"
"time"

"github.com/OpenBazaar/wallet-interface"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
btcrpcclient "github.com/btcsuite/btcd/rpcclient"
"io/ioutil"
"net/http"
"time"
)

type NotificationListener struct {
Expand Down
17 changes: 9 additions & 8 deletions wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ import (
"encoding/json"
"errors"
"fmt"
"os"
"os/exec"
"path"
"runtime"
"strconv"
"strings"
"time"

"github.com/OpenBazaar/bitcoind-wallet"
"github.com/OpenBazaar/spvwallet"
"github.com/OpenBazaar/wallet-interface"
Expand All @@ -27,13 +35,6 @@ import (
"github.com/op/go-logging"
b39 "github.com/tyler-smith/go-bip39"
"golang.org/x/net/proxy"
"os"
"os/exec"
"path"
"runtime"
"strconv"
"strings"
"time"
)

var log = logging.MustGetLogger("zcashd")
Expand Down Expand Up @@ -544,7 +545,7 @@ func (w *ZcashdWallet) gatherCoins() (map[coinset.Coin]*hd.ExtendedKey, error) {
return m, nil
}

func (w *ZcashdWallet) Spend(amount int64, addr btc.Address, feeLevel wallet.FeeLevel) (*chainhash.Hash, error) {
func (w *ZcashdWallet) Spend(amount int64, addr btc.Address, feeLevel wallet.FeeLevel, referenceID string) (*chainhash.Hash, error) {
<-w.initChan
tx, err := w.buildTx(amount, addr, feeLevel)
if err != nil {
Expand Down