This commit is contained in:
committed by
Christopher Goes
parent
157047c8a3
commit
ec2fedd36c
+1
-1
@@ -160,7 +160,7 @@ func GetFromBech32(bech32str, prefix string) ([]byte, error) {
|
||||
}
|
||||
|
||||
if hrp != prefix {
|
||||
return nil, fmt.Errorf("Invalid bech32 prefix. Expected %s, Got %s", prefix, hrp)
|
||||
return nil, fmt.Errorf("invalid bech32 prefix. Expected %s, Got %s", prefix, hrp)
|
||||
}
|
||||
|
||||
return bz, nil
|
||||
|
||||
+2
-2
@@ -280,7 +280,7 @@ func ParseCoin(coinStr string) (coin Coin, err error) {
|
||||
|
||||
matches := reCoin.FindStringSubmatch(coinStr)
|
||||
if matches == nil {
|
||||
err = fmt.Errorf("Invalid coin expression: %s", coinStr)
|
||||
err = fmt.Errorf("invalid coin expression: %s", coinStr)
|
||||
return
|
||||
}
|
||||
denomStr, amountStr := matches[2], matches[1]
|
||||
@@ -316,7 +316,7 @@ func ParseCoins(coinsStr string) (coins Coins, err error) {
|
||||
|
||||
// Validate coins before returning.
|
||||
if !coins.IsValid() {
|
||||
return nil, fmt.Errorf("ParseCoins invalid: %#v", coins)
|
||||
return nil, fmt.Errorf("parseCoins invalid: %#v", coins)
|
||||
}
|
||||
|
||||
return coins, nil
|
||||
|
||||
+14
-14
@@ -68,31 +68,31 @@ const (
|
||||
func CodeToDefaultMsg(code CodeType) string {
|
||||
switch code {
|
||||
case CodeInternal:
|
||||
return "Internal error"
|
||||
return "internal error"
|
||||
case CodeTxDecode:
|
||||
return "Tx parse error"
|
||||
return "tx parse error"
|
||||
case CodeInvalidSequence:
|
||||
return "Invalid sequence"
|
||||
return "invalid sequence"
|
||||
case CodeUnauthorized:
|
||||
return "Unauthorized"
|
||||
return "unauthorized"
|
||||
case CodeInsufficientFunds:
|
||||
return "Insufficent funds"
|
||||
return "insufficent funds"
|
||||
case CodeUnknownRequest:
|
||||
return "Unknown request"
|
||||
return "unknown request"
|
||||
case CodeInvalidAddress:
|
||||
return "Invalid address"
|
||||
return "invalid address"
|
||||
case CodeInvalidPubKey:
|
||||
return "Invalid pubkey"
|
||||
return "invalid pubkey"
|
||||
case CodeUnknownAddress:
|
||||
return "Unknown address"
|
||||
return "unknown address"
|
||||
case CodeInsufficientCoins:
|
||||
return "Insufficient coins"
|
||||
return "insufficient coins"
|
||||
case CodeInvalidCoins:
|
||||
return "Invalid coins"
|
||||
return "invalid coins"
|
||||
case CodeOutOfGas:
|
||||
return "Out of gas"
|
||||
return "out of gas"
|
||||
default:
|
||||
return fmt.Sprintf("Unknown code %d", code)
|
||||
return fmt.Sprintf("unknown code %d", code)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ type sdkError struct {
|
||||
|
||||
// Implements ABCIError.
|
||||
func (err *sdkError) Error() string {
|
||||
return fmt.Sprintf("Error{%d:%d,%#v}", err.codespace, err.code, err.err)
|
||||
return fmt.Sprintf("error{%d:%d,%#v}", err.codespace, err.code, err.err)
|
||||
}
|
||||
|
||||
// Implements ABCIError.
|
||||
|
||||
Reference in New Issue
Block a user