From fc72ec022a20e261c10ac11cb699c90c3dd05b49 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Wed, 7 Aug 2024 16:45:20 +0200 Subject: [PATCH] wallet: extend TestFundTransaction --- wallet/wallet_test.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/wallet/wallet_test.go b/wallet/wallet_test.go index 6359ed4..3ff6f68 100644 --- a/wallet/wallet_test.go +++ b/wallet/wallet_test.go @@ -1392,7 +1392,20 @@ func TestFundTransaction(t *testing.T) { } // try again using unconfirmed balance, should work - _, _, err = w.FundV2Transaction(&txnV2, sendAmt, true) + txnV2 = types.V2Transaction{ + SiacoinOutputs: []types.SiacoinOutput{ + { + Address: w.Address(), + Value: sendAmt, + }, + }, + } + state, toSignV2, err = w.FundV2Transaction(&txnV2, sendAmt, true) + if err != nil { + t.Fatal(err) + } + w.SignV2Inputs(state, &txnV2, toSignV2) + _, err = cm.AddV2PoolTransactions(cm.Tip(), []types.V2Transaction{txnV2}) if err != nil { t.Fatal(err) }