Skip to content

Commit

Permalink
removed tip
Browse files Browse the repository at this point in the history
  • Loading branch information
bizk committed Nov 23, 2023
1 parent b0ba826 commit 68661b3
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,6 @@ func parseSignerData(signerData authsigning.SignerData) signing2.SignerData {
return signing2.SignerData{Address: strconv.FormatUint(signerData.AccountNumber, 10), ChainID: signerData.ChainID, AccountNumber: signerData.AccountNumber, Sequence: signerData.Sequence, PubKey: &parsedSignerDataPublicKey}
}

func parseTxTip(tx authsigning.Tx) txv1beta1.Tip { // nolint: staticcheck // Because we still need to use
parsedTipAmount := []*v1beta1.Coin{}
tipper := string(tx.FeePayer())

// if tx.GetTip() != nil {
// for _, txCoin := range tx.GetTip().Amount {
// parsedTipAmount = append(parsedTipAmount, &v1beta1.Coin{
// Denom: txCoin.Denom,
// Amount: txCoin.Amount.String(),
// })
// }
// tipper = tx.GetTip().Tipper
//}

return txv1beta1.Tip{ // nolint: staticcheck // Because we still need to use
Amount: parsedTipAmount,
Tipper: tipper,
}
}

func parseSignerInfo(signerData signing2.SignerData) []*txv1beta1.SignerInfo {
parsedSignerInfo := []*txv1beta1.SignerInfo{}
signerInfo := &txv1beta1.SignerInfo{
Expand Down Expand Up @@ -120,7 +100,6 @@ func parseFeeAmount(tx authsigning.Tx) []*v1beta1.Coin {
}

func parseAuthInfo(tx authsigning.Tx, signerData signing2.SignerData) *txv1beta1.AuthInfo {
parsedTxTip := parseTxTip(tx)
parsedFeeAmount := parseFeeAmount(tx)

parsedSignerInfo := parseSignerInfo(signerData)
Expand All @@ -133,7 +112,6 @@ func parseAuthInfo(tx authsigning.Tx, signerData signing2.SignerData) *txv1beta1
Payer: string(tx.FeePayer()),
Granter: string(tx.FeeGranter()),
},
Tip: &parsedTxTip,
}
}

Expand Down

0 comments on commit 68661b3

Please sign in to comment.