Skip to content

Commit

Permalink
fix(wasp-cli): don't crash on deposits if chain is set for 0 fees
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemmsilva committed May 6, 2024
1 parent 789964e commit 1916126
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/wasp-cli/chain/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ func baseTokensForDepositFee(client *apiclient.APIClient, chain string) uint64 {

feePolicyBytes := callGovView(governance.ViewGetFeePolicy.Name).Get(governance.ParamFeePolicyBytes)
feePolicy := gas.MustFeePolicyFromBytes(feePolicyBytes)
if feePolicy.GasPerToken.HasZeroComponent() {
return 0
}

gasLimitsBytes := callGovView(governance.ViewGetGasLimits.Name).Get(governance.ParamGasLimitsBytes)
gasLimits, err := gas.LimitsFromBytes(gasLimitsBytes)
Expand Down

0 comments on commit 1916126

Please sign in to comment.