Skip to content

Commit

Permalink
implement V2AdaptableTx in wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
kocubinski committed Apr 21, 2023
1 parent b4aeece commit 00a357c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion x/auth/ante/sigverify.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul
if !ok {
return ctx, fmt.Errorf("expected tx to implement V2AdaptableTx, got %T", tx)
}
txData := authsigning.AdapterToTxData(adaptableTx)
txData := authsigning.AdaptableToTxData(adaptableTx)
err = authsigning.VerifySignature(ctx, pubKey, signerData, sig.Data, svd.signModeHandler, txData)
if err != nil {
var errMsg string
Expand Down
4 changes: 2 additions & 2 deletions x/auth/signing/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func GetSignBytesAdapter(
if !ok {
return nil, fmt.Errorf("expected tx to be V2AdaptableTx, got %T", tx)
}
txData := AdapterToTxData(adaptableTx)
txData := AdaptableToTxData(adaptableTx)

txSignMode, err := internalSignModeToAPI(mode)
if err != nil {
Expand All @@ -66,7 +66,7 @@ func GetSignBytesAdapter(
return handlerMap.GetSignBytes(ctx, txSignMode, txSignerData, txData)
}

func AdapterToTxData(adaptableTx V2AdaptableTx) txsigning.TxData {
func AdaptableToTxData(adaptableTx V2AdaptableTx) txsigning.TxData {
body := adaptableTx.GetTxBody()

msgs := make([]*anypb.Any, len(body.Messages))
Expand Down
2 changes: 1 addition & 1 deletion x/auth/tx/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ func (w *wrapper) GetSignerInfos() []*tx.SignerInfo {
return w.tx.AuthInfo.SignerInfos
}

func (w *wrapper) GetBody() *tx.TxBody {
func (w *wrapper) GetTxBody() *tx.TxBody {
return w.tx.Body
}

Expand Down

0 comments on commit 00a357c

Please sign in to comment.