Skip to content

Commit

Permalink
Fixes the following of received assets
Browse files Browse the repository at this point in the history
  • Loading branch information
gertjaap committed Dec 10, 2018
1 parent 103f880 commit b613fa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion wallet/openassets.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ func (w *Wallet) processOpenAssetTransaction(tx *wire.MsgTx) {
// Register the new asset
txHash := tx.TxHash()
oatxo.AssetID = btcutil.Hash160(txHash[:])

w.registerAsset(OpenAsset{
AssetID: oatxo.AssetID,
Follow: oatxo.Ours,
Expand Down
6 changes: 3 additions & 3 deletions wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Wallet struct {
config *config.Config
utxos []Utxo
assetUtxos []OpenAssetUtxo
assets []OpenAsset
assets []*OpenAsset
privateKey *btcec.PrivateKey
pubKey *btcec.PublicKey
pubKeyHash [20]byte
Expand Down Expand Up @@ -86,7 +86,7 @@ func (w *Wallet) AssetBalance(assetID []byte) uint64 {
return value
}

func (w *Wallet) Assets() []OpenAsset {
func (w *Wallet) Assets() []*OpenAsset {
return w.assets
}

Expand Down Expand Up @@ -155,7 +155,7 @@ func (w *Wallet) registerAssetUtxo(utxo OpenAssetUtxo) {
}

func (w *Wallet) registerAsset(asset OpenAsset) {
w.assets = append(w.assets, asset)
w.assets = append(w.assets, &asset)
}

func (w *Wallet) FindUtxoFromTxIn(txi *wire.TxIn) (Utxo, error) {
Expand Down

0 comments on commit b613fa5

Please sign in to comment.