Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kocubinski committed Apr 21, 2023
1 parent 2a89563 commit 17bd6fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions x/auth/signing/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,20 @@ func AdaptableToTxData(adaptableTx V2AdaptableTx) txsigning.TxData {
}
}

var txTip *txv1beta1.Tip
tip := adaptableTx.GetTip()
tipCoins := tip.GetAmount()
tipAmount := make([]*basev1beta1.Coin, len(tipCoins))
var tipper string
if tip != nil {
tipper = tip.GetTipper()
}
for i, coin := range tipCoins {
tipAmount[i] = &basev1beta1.Coin{
Denom: coin.Denom,
Amount: coin.Amount.String(),
tipCoins := tip.GetAmount()
tipAmount := make([]*basev1beta1.Coin, len(tipCoins))
for i, coin := range tipCoins {
tipAmount[i] = &basev1beta1.Coin{
Denom: coin.Denom,
Amount: coin.Amount.String(),
}
}
txTip = &txv1beta1.Tip{
Amount: tipAmount,
Tipper: tip.Tipper,
}
}

Expand Down Expand Up @@ -140,10 +143,7 @@ func AdaptableToTxData(adaptableTx V2AdaptableTx) txsigning.TxData {
Payer: adaptableTx.FeePayer().String(),
Granter: adaptableTx.FeeGranter().String(),
},
Tip: &txv1beta1.Tip{
Amount: tipAmount,
Tipper: tipper,
},
Tip: txTip,
}

txBody := &txv1beta1.TxBody{
Expand Down
4 changes: 2 additions & 2 deletions x/auth/tx/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ func (w *wrapper) GetTxBody() *tx.TxBody {
}

func (w *wrapper) GetBodyBytes() []byte {
return w.bodyBz
return w.getBodyBytes()
}

func (w *wrapper) GetAuthInfoBytes() []byte {
return w.authInfoBz
return w.getAuthInfoBytes()
}

0 comments on commit 17bd6fa

Please sign in to comment.