File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,15 @@ npm install keychain.js
64
64
const { Keychain , KeychainWeb3 } = require (' keychain.js' );
65
65
const Web3 = require (' web3' );
66
66
const web3 = new Web3 (' YOUR_API_URL' ); // https://ropsten.infura.io/v3/046804e3dd3240b09834531326f310cf
67
- const transactionParams = {
67
+ const tx = {
68
68
to: ' 0xE8899BA12578d60e4D0683a596EDaCbC85eC18CC' ,
69
69
value: 100 ,
70
70
gas: 21000
71
71
};
72
72
const keychain = new Keychain ();
73
73
const keychainWeb3 = new KeychainWeb3 (keychain, web3);
74
74
keychain .selectKey ()
75
- .then (publicKey => keychainWeb3 .signTransaction (transactionParams , publicKey))
75
+ .then (publicKey => keychainWeb3 .signTransaction (tx , publicKey))
76
76
.then (result => web3 .eth .sendSignedTransaction (result .rawTransaction ));
77
77
```
78
78
You can’t perform that action at this time.
0 commit comments