Skip to content

Commit

Permalink
Fix problems introduced in previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrm50 committed Nov 7, 2023
1 parent fe232db commit dfb84b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/testsuite/mock/wallet_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,14 @@ func (w *Wallet) createSignedTransactionWithOptions(transactionName string, opts

addrSigner := w.AddressSigner()
signedTransaction, err := options.Apply(txBuilder, opts).Build(addrSigner)
if err != nil {
return nil, err
}

// register the outputs in the wallet
w.registerOutputs(transactionName, signedTransaction.Transaction)

return signedTransaction, err
return signedTransaction, nil
}

func (w *Wallet) registerOutputs(transactionName string, transaction *iotago.Transaction) {
Expand Down
4 changes: 4 additions & 0 deletions pkg/testsuite/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ func (t *TestSuite) addWallet(name string, node *mock.Node, accountID iotago.Acc
}

func (t *TestSuite) DefaultWallet() *mock.Wallet {
if t.wallets.Has("default") {
return lo.Return1(t.wallets.Get("default"))
}

_, defaultWallet, exists := t.wallets.Head()
if !exists {
return nil
Expand Down

0 comments on commit dfb84b3

Please sign in to comment.