From 042005fc52b942d491e956f16edfbd4efbcf0b81 Mon Sep 17 00:00:00 2001 From: paologalligit Date: Thu, 19 Dec 2024 12:54:28 +0100 Subject: [PATCH] Rebase to master --- thorclient/api_test.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/thorclient/api_test.go b/thorclient/api_test.go index 55aae6691..36116bee5 100644 --- a/thorclient/api_test.go +++ b/thorclient/api_test.go @@ -218,7 +218,7 @@ func testTransactionsEndpoint(t *testing.T, thorChain *testchain.Chain, ts *http t.Run("SendTransaction", func(t *testing.T) { toAddr := thor.MustParseAddress("0x0123456789abcdef0123456789abcdef01234567") clause := tx.NewClause(&toAddr).WithValue(big.NewInt(10000)) - trx := new(tx.Builder). + trx := new(tx.LegacyBuilder). ChainTag(thorChain.Repo().ChainTag()). Expiration(10). Gas(21000). @@ -230,6 +230,19 @@ func testTransactionsEndpoint(t *testing.T, thorChain *testchain.Chain, ts *http require.NoError(t, err) require.NotNil(t, sendResult) require.Equal(t, trx.ID().String(), sendResult.ID.String()) // Ensure transaction was successful + + trx = new(tx.DynFeeBuilder). + ChainTag(thorChain.Repo().ChainTag()). + Expiration(10). + Gas(21000). + Clause(clause). + Build() + + trx = tx.MustSign(trx, genesis.DevAccounts()[0].PrivateKey) + sendResult, err = c.SendTransaction(trx) + require.NoError(t, err) + require.NotNil(t, sendResult) + require.Equal(t, trx.ID().String(), sendResult.ID.String()) // Ensure transaction was successful }) // 3. Test retrieving the transaction receipt