Skip to content

Commit 31e06ec

Browse files
committed
compute tx fees dynamically
1 parent 008963e commit 31e06ec

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

core/wallet/os_keyring.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ func InitOSKeyringWallet() (Wallet, error) {
9595
l.SetOutput(os.Stderr)
9696
ctx := logger.ContextWithValue(context.Background(), l)
9797
glib.WithGitopiaAddr(config.GRPCHost)
98-
// glib.WithFeeGranter(config.FeeGranterAddr)
98+
glib.WithGasPrices(config.GasPrices)
9999
cc, err := NewContext(key)
100100
if err != nil {
101101
return nil, errors.Wrap(err, "error creating cosmos client context")
102102
}
103-
txf := tx.NewFactoryCLI(cc, &pflag.FlagSet{}).WithGasPrices(config.GasPrices)
103+
txf := tx.NewFactoryCLI(cc, &pflag.FlagSet{}).WithGasAdjustment(GAS_ADJUSTMENT)
104104
gc, err := glib.NewClient(ctx, cc, txf)
105105
if err != nil {
106106
return nil, errors.Wrap(err, "error creating cosmos client")

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.19
44

55
require (
66
github.com/cosmos/cosmos-sdk v0.46.12
7-
github.com/gitopia/gitopia-go v0.3.3
7+
github.com/gitopia/gitopia-go v0.3.4-0.20230606152806-95aa197de17e
88
github.com/gitopia/gitopia/v2 v2.0.1
99
github.com/go-git/go-git/v5 v5.5.1
1010
github.com/pkg/errors v0.9.1

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmV
206206
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
207207
github.com/gitopia/gitopia-go v0.3.3 h1:hXPj00AJ9Rqfrvv8XoOUrcFGLT7Pkbz1fdt9b/LfkvM=
208208
github.com/gitopia/gitopia-go v0.3.3/go.mod h1:1in+bQqP/CFduTIvJbB8WowPGRBhvyFkp+ZhBddutt0=
209+
github.com/gitopia/gitopia-go v0.3.4-0.20230606040529-35a837b457c9 h1:YRw8ZTqK8CZ3W4cys2yvsomCDko5VQXE7jPsdGtexNw=
210+
github.com/gitopia/gitopia-go v0.3.4-0.20230606040529-35a837b457c9/go.mod h1:1in+bQqP/CFduTIvJbB8WowPGRBhvyFkp+ZhBddutt0=
211+
github.com/gitopia/gitopia-go v0.3.4-0.20230606152806-95aa197de17e h1:8sE+tXxZDvbuuBxCWMAIpGukL5BklOYSoL9b44QOiqc=
212+
github.com/gitopia/gitopia-go v0.3.4-0.20230606152806-95aa197de17e/go.mod h1:1in+bQqP/CFduTIvJbB8WowPGRBhvyFkp+ZhBddutt0=
209213
github.com/gitopia/gitopia/v2 v2.0.1 h1:SeHwKkUkA+bqEzsgVimsOb5v6A1wL6O0zqQg/PSSl5c=
210214
github.com/gitopia/gitopia/v2 v2.0.1/go.mod h1:ZEEo2wHSxjJL3tcGg+ZenFlYMhfqFzwJkGkNMkgA9lE=
211215
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=

0 commit comments

Comments
 (0)