mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-13 04:24:14 +00:00
25 lines
581 B
TypeScript
25 lines
581 B
TypeScript
|
import { Wei } from 'libs/units';
|
||
|
import * as eth from './ether';
|
||
|
import { IFullWallet } from 'libs/wallet';
|
||
|
import { ITransaction } from '../typings';
|
||
|
export { signTransaction };
|
||
|
export {
|
||
|
enoughBalanceViaTx,
|
||
|
validateTx,
|
||
|
validGasLimit,
|
||
|
makeTransaction,
|
||
|
getTransactionFields,
|
||
|
computeIndexingHash
|
||
|
} from './ether';
|
||
|
export * from './token';
|
||
|
const signTransaction = async (
|
||
|
t: ITransaction,
|
||
|
w: IFullWallet,
|
||
|
accountBalance: Wei,
|
||
|
isOffline: boolean
|
||
|
) => {
|
||
|
eth.validateTx(t, accountBalance, isOffline);
|
||
|
const signedT = await eth.signTx(t, w);
|
||
|
return signedT;
|
||
|
};
|