fixed error for blank fee string

This commit is contained in:
David Kajpust 2018-06-29 11:50:32 -04:00
parent 0a76035398
commit 64ea408b38
1 changed files with 8 additions and 3 deletions

View File

@ -124,10 +124,15 @@ func (ctx CoreContext) SignAndBuild(name, passphrase string, msgs []sdk.Msg, cdc
accnum := ctx.AccountNumber
sequence := ctx.Sequence
memo := ctx.Memo
fee , err := sdk.ParseCoin(ctx.Fee)
fee := sdk.Coin{}
if ctx.Fee != "" {
parsedFee, err := sdk.ParseCoin(ctx.Fee)
if err != nil {
return nil, err
}
fee = parsedFee
}
signMsg := auth.StdSignMsg{
ChainID: chainID,