Skip to content

Commit

Permalink
Set the expiration after we have unlocked the vault, in case
Browse files Browse the repository at this point in the history
you went searching for your passphrase during those default 30 seconds
  • Loading branch information
abourget committed Dec 17, 2018
1 parent f6c093d commit d1fc375
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions eosc/cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ func pushEOSCActionsAndContextFreeActions(api *eos.API, contextFreeActions []*eo

tx = optionallySudoWrap(tx, opts)

tx.SetExpiration(time.Duration(viper.GetInt("global-expiration")) * time.Second)

signedTx, packedTx := optionallySignTransaction(tx, opts.ChainID, api)

optionallyPushTransaction(signedTx, packedTx, opts.ChainID, api)
Expand Down Expand Up @@ -188,10 +186,14 @@ func optionallySignTransaction(tx *eos.Transaction, chainID eos.SHA256Bytes, api

attachWallet(api)

tx.SetExpiration(time.Duration(viper.GetInt("global-expiration")) * time.Second)

var err error
signedTx, packedTx, err = api.SignTransaction(tx, chainID, eos.CompressionNone)
errorCheck("signing transaction", err)
} else {
tx.SetExpiration(time.Duration(viper.GetInt("global-expiration")) * time.Second)

signedTx = eos.NewSignedTransaction(tx)
}
return signedTx, packedTx
Expand Down

0 comments on commit d1fc375

Please sign in to comment.