Make coins denoms case insensitive (#3092)

This commit is contained in:
Alessio Treglia
2018-12-18 11:14:11 -08:00
committed by Jack Zampolin
parent eac7d6939d
commit 500fa2b694
14 changed files with 159 additions and 136 deletions
+1 -1
View File
@@ -709,7 +709,7 @@ func TestAdjustFeesByGas(t *testing.T) {
want sdk.Coins
}{
{"nil coins", args{sdk.Coins{}, 100000}, sdk.Coins{}},
{"nil coins", args{sdk.Coins{sdk.NewInt64Coin("A", 10), sdk.NewInt64Coin("B", 0)}, 100000}, sdk.Coins{sdk.NewInt64Coin("A", 20), sdk.NewInt64Coin("B", 10)}},
{"nil coins", args{sdk.Coins{sdk.NewInt64Coin("a", 10), sdk.NewInt64Coin("b", 0)}, 100000}, sdk.Coins{sdk.NewInt64Coin("a", 20), sdk.NewInt64Coin("b", 10)}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
+1 -1
View File
@@ -179,7 +179,7 @@ func GetCmdDeposit(queryRoute string, cdc *codec.Codec) *cobra.Command {
Long: strings.TrimSpace(`
Submit a deposit for an acive proposal. You can find the proposal-id by running gaiacli query gov proposals:
$ gaiacli tx gov deposit 1 10STAKE --from mykey
$ gaiacli tx gov deposit 1 10stake --from mykey
`),
RunE: func(cmd *cobra.Command, args []string) error {
txBldr := authtxb.NewTxBuilderFromCLI().WithTxEncoder(utils.GetTxEncoder(cdc))
+1 -1
View File
@@ -12,7 +12,7 @@ import (
type CodeType = sdk.CodeType
const (
DefaultCodespace sdk.CodespaceType = "STAKE"
DefaultCodespace sdk.CodespaceType = "stake"
CodeInvalidValidator CodeType = 101
CodeInvalidDelegation CodeType = 102
+1 -1
View File
@@ -21,7 +21,7 @@ const (
ValidatorUpdateDelay int64 = 1
// Default bondable coin denomination
DefaultBondDenom = "STAKE"
DefaultBondDenom = "stake"
)
// nolint - Keys for parameter access