@@ -4,7 +4,6 @@ import Tx from 'ethereumjs-tx';
4import { toWei, fromWei, toHex } from 'web3-utils';
4import { toWei, fromWei, toHex } from 'web3-utils';
5import * as retry from 'async-retry';
5import * as retry from 'async-retry';
7−import { BRIDGE_ERROR } from './error';
8import { NETWORK_TYPES } from './network';
7import { NETWORK_TYPES } from './network';
9import { ledgerSignTransaction } from './ledger';
8import { ledgerSignTransaction } from './ledger';
10import { trezorSignTransaction } from './trezor';
9import { trezorSignTransaction } from './trezor';
@@ -114,21 +113,7 @@ const signTransaction = async config => {
114 ? Object.assign(txParams, eip155Params)
113 ? Object.assign(txParams, eip155Params)
115 : txParams;
114 : txParams;
117− const wal = wallet.matchWith({
120− throw BRIDGE_ERROR.MISSING_WALLET;
124− const sec = wal.privateKey;
126− const utx = txn.matchWith({
127− Just: tx => Object.assign(tx.value, signingParams),
116+ const utx = Object.assign(txn, signingParams);
129− throw BRIDGE_ERROR.MISSING_TXN;
133 const stx = new Tx(utx);
118 const stx = new Tx(utx);
@@ -137,7 +122,7 @@ const signTransaction = async config => {
137 } else if (walletType === WALLET_TYPES.TREZOR) {
122 } else if (walletType === WALLET_TYPES.TREZOR) {
138 await trezorSignTransaction(stx, walletHdPath);
123 await trezorSignTransaction(stx, walletHdPath);
140− stx.sign(sec);
125+ stx.sign(wallet.privateKey);
143 setStx(Just(stx));
128 setStx(Just(stx));