1import { toHex } from 'web3-utils';
3export function MetamaskWallet(address) {
4 this.address = address;
7export function FakeMetamaskTransaction(txnData) {
8 this.txnData = txnData;
10 this.serialize = function() {
15// Cheat a bit and pretend to sign transaction
16// Sign it actually when sending
17export const metamaskSignTransaction = async (txn, from) => {
18 const metamaskFormattedTxn = {
20 gasLimit: txn.gasLimit,
21 gasPrice: txn.gasPrice,
27 return new FakeMetamaskTransaction(metamaskFormattedTxn);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list