Skip to content

Commit 53f7711

Browse files
authored
Update README.md
1 parent 17fce44 commit 53f7711

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ npm install keychain.js
6464
const { Keychain, KeychainWeb3 } = require('keychain.js');
6565
const Web3 = require('web3');
6666
const web3 = new Web3('YOUR_API_URL'); // https://ropsten.infura.io/v3/046804e3dd3240b09834531326f310cf
67-
const transactionParams = {
67+
const tx = {
6868
to: '0xE8899BA12578d60e4D0683a596EDaCbC85eC18CC',
6969
value: 100,
7070
gas: 21000
7171
};
7272
const keychain = new Keychain();
7373
const keychainWeb3 = new KeychainWeb3(keychain, web3);
7474
keychain.selectKey()
75-
.then(publicKey => keychainWeb3.signTransaction(transactionParams, publicKey))
75+
.then(publicKey => keychainWeb3.signTransaction(tx, publicKey))
7676
.then(result => web3.eth.sendSignedTransaction(result.rawTransaction));
7777
```
7878

0 commit comments

Comments
 (0)