Skip to content

Commit

Permalink
refactor: simplify tx context teset helpers
Browse files Browse the repository at this point in the history
(cherry picked from commit e2303a5b776830815457f12f5e371e916e3bee93)
  • Loading branch information
bryanchriswhite committed Nov 1, 2023
1 parent 77c9563 commit 25abb23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/testclient/testtx/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ func NewOneTimeErrTxTimeoutTxContext(
t *testing.T,
keyring cosmoskeyring.Keyring,
signingKeyName string,
expectedTx *cometbytes.HexBytes,
expectedErrMsg *string,
) *mockclient.MockTxContext {
t.Helper()
Expand All @@ -69,10 +68,11 @@ func NewOneTimeErrTxTimeoutTxContext(
signerAddr.String(),
)

var expectedTx cometbytes.HexBytes
txCtxMock := NewBaseTxContext(
t, signingKeyName,
keyring,
expectedTx,
&expectedTx,
)

// intercept #BroadcastTx() call to mock response and prevent actual broadcast
Expand Down Expand Up @@ -138,7 +138,6 @@ func NewOneTimeErrCheckTxTxContext(
t *testing.T,
keyring cosmoskeyring.Keyring,
signingKeyName string,
expectedTx *cometbytes.HexBytes,
expectedErrMsg *string,
) *mockclient.MockTxContext {
t.Helper()
Expand All @@ -154,10 +153,11 @@ func NewOneTimeErrCheckTxTxContext(
signerAddr.String(),
)

var expectedTx cometbytes.HexBytes
txCtxMock := NewBaseTxContext(
t, signingKeyName,
keyring,
expectedTx,
&expectedTx,
)

// intercept #BroadcastTx() call to mock response and prevent actual broadcast
Expand Down

0 comments on commit 25abb23

Please sign in to comment.