diff --git a/go.mod b/go.mod index ae26ad01..23a18750 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/cosmos/ibc-go/v8 v8.5.1 github.com/monerium/module-noble/v2 v2.0.0-rc.3.0.20241009233532-f2109c84b6c1 github.com/noble-assets/authority v1.0.0-rc.0 - github.com/noble-assets/forwarding/v2 v2.0.0-20240829085026-e00f6bfe13f1 + github.com/noble-assets/forwarding/v2 v2.0.0-20241017154500-56685530d602 github.com/noble-assets/halo/v2 v2.0.0-20240928083543-bd3392537219 github.com/ondoprotocol/usdy-noble/v2 v2.0.0-20241008190859-099f72833941 github.com/spf13/cobra v1.8.1 diff --git a/go.sum b/go.sum index 267655e8..f9a71653 100644 --- a/go.sum +++ b/go.sum @@ -1059,8 +1059,8 @@ github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/noble-assets/authority v1.0.0-rc.0 h1:mrMhEK3+F2lNRMGJalydAt0gTEK+WGtCW4wV3aU++gM= github.com/noble-assets/authority v1.0.0-rc.0/go.mod h1:AyCyM1iP73dHxBsulw0GpZNgPIQvSndWp30pK87nmog= -github.com/noble-assets/forwarding/v2 v2.0.0-20240829085026-e00f6bfe13f1 h1:ZsQDkY+YtSiLaf9JYhP63JGtKEcKW9h++VCvRcwcWcE= -github.com/noble-assets/forwarding/v2 v2.0.0-20240829085026-e00f6bfe13f1/go.mod h1:OGbKgjHf/4HHthbilK9RCPsBXUS40LFxRl4cAcNhqwk= +github.com/noble-assets/forwarding/v2 v2.0.0-20241017154500-56685530d602 h1:yNN1TU1qSAWfWUZBBVK2qQgVoKG4z/Q4JuUXgzyQUcE= +github.com/noble-assets/forwarding/v2 v2.0.0-20241017154500-56685530d602/go.mod h1:OGbKgjHf/4HHthbilK9RCPsBXUS40LFxRl4cAcNhqwk= github.com/noble-assets/halo/v2 v2.0.0-20240928083543-bd3392537219 h1:kFPNHaKQ6L6FY/qcXVe5guZnBmpbx1YVApyxywMSpAs= github.com/noble-assets/halo/v2 v2.0.0-20240928083543-bd3392537219/go.mod h1:DY4GCfZ/7S3IEjoJBCCh7HRTxirPBOLMVwkT0N6n3bA= github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= diff --git a/upgrade/upgrade.go b/upgrade/upgrade.go index 46fd4c25..3eed1ffb 100644 --- a/upgrade/upgrade.go +++ b/upgrade/upgrade.go @@ -180,11 +180,11 @@ func MigrateValidatorAccounts(ctx context.Context, accountKeeper authkeeper.Acco // BurnSurplusSupply performs a burn of the surplus $STAKE supply. func BurnSurplusSupply(ctx context.Context, authority string, accountKeeper authkeeper.AccountKeeper, bankKeeper bankkeeper.Keeper) error { supply := bankKeeper.GetSupply(ctx, "ustake") - surplus := supply.Sub(sdk.NewCoin( + surplus, err := supply.SafeSub(sdk.NewCoin( "ustake", math.NewInt(1_000_000_000_000_000), )) - if !surplus.IsPositive() { + if err != nil || !surplus.IsPositive() { return nil }