diff --git a/pkg/testsuite/mock/wallet_transactions.go b/pkg/testsuite/mock/wallet_transactions.go index 76c57472a..bc5912292 100644 --- a/pkg/testsuite/mock/wallet_transactions.go +++ b/pkg/testsuite/mock/wallet_transactions.go @@ -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) { diff --git a/pkg/testsuite/testsuite.go b/pkg/testsuite/testsuite.go index bcf027279..3492988de 100644 --- a/pkg/testsuite/testsuite.go +++ b/pkg/testsuite/testsuite.go @@ -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