Skip to content

Commit 8fbcbaf

Browse files
authored
feat(tx): add public tip getter (#40)
1 parent c7845d7 commit 8fbcbaf

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

types/tx/tips.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package tx
2+
3+
// TipTx defines the interface to be implemented by Txs that handle Tips.
4+
type TipTx interface {
5+
GetTip() *Tip
6+
}

x/auth/tx/builder.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ func (w *wrapper) GetTimeoutHeight() uint64 {
221221
return w.tx.Body.TimeoutHeight
222222
}
223223

224+
func (w *wrapper) GetTip() *tx.Tip {
225+
return w.tx.AuthInfo.Tip
226+
}
227+
224228
func (w *wrapper) GetSignaturesV2() ([]signing.SignatureV2, error) {
225229
signerInfos := w.tx.AuthInfo.SignerInfos
226230
sigs := w.tx.Signatures

0 commit comments

Comments
 (0)