Skip to content

Commit

Permalink
Rebase to master
Browse files Browse the repository at this point in the history
  • Loading branch information
paologalligit committed Jan 3, 2025
1 parent 2fb8578 commit 042005f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion thorclient/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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
Expand Down

0 comments on commit 042005f

Please sign in to comment.