Skip to content

Commit

Permalink
Fix SignTx calls in executables other than geth.
Browse files Browse the repository at this point in the history
  • Loading branch information
joelburget committed Aug 24, 2017
1 parent 165e40b commit 214c4e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/faucet/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ func (f *faucet) apiHandler(conn *websocket.Conn) {
amount = new(big.Int).Div(amount, new(big.Int).Exp(big.NewInt(2), big.NewInt(int64(msg.Tier)), nil))

tx := types.NewTransaction(f.nonce+uint64(len(f.reqs)), address, amount, big.NewInt(21000), f.price, nil)
signed, err := f.keystore.SignTx(f.account, tx, f.config.ChainId)
signed, err := f.keystore.SignTx(f.account, tx, f.config.ChainId, false)
if err != nil {
websocket.JSON.Send(conn, map[string]string{"error": err.Error()})
f.lock.Unlock()
Expand Down
4 changes: 2 additions & 2 deletions internal/guide/guide_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestAccountManagement(t *testing.T) {
if err := ks.Unlock(signer, "Signer password"); err != nil {
t.Fatalf("Failed to unlock account: %v", err)
}
if _, err := ks.SignTx(signer, tx, chain); err != nil {
if _, err := ks.SignTx(signer, tx, chain, false); err != nil {
t.Fatalf("Failed to sign with unlocked account: %v", err)
}
if err := ks.Lock(signer.Address); err != nil {
Expand All @@ -95,7 +95,7 @@ func TestAccountManagement(t *testing.T) {
if err := ks.TimedUnlock(signer, "Signer password", time.Second); err != nil {
t.Fatalf("Failed to time unlock account: %v", err)
}
if _, err := ks.SignTx(signer, tx, chain); err != nil {
if _, err := ks.SignTx(signer, tx, chain, false); err != nil {
t.Fatalf("Failed to sign with time unlocked account: %v", err)
}
}
2 changes: 1 addition & 1 deletion mobile/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (ks *KeyStore) SignTx(account *Account, tx *Transaction, chainID *BigInt) (
if chainID == nil { // Null passed from mobile app
chainID = new(BigInt)
}
signed, err := ks.keystore.SignTx(account.account, tx.tx, chainID.bigint)
signed, err := ks.keystore.SignTx(account.account, tx.tx, chainID.bigint, false)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 214c4e1

Please sign in to comment.