mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 11:34:26 +00:00
307e941684
* Parity Signer Squashed * ParitySigner to be a container * Parity Signer: style and polish * target blank on appstore links * PR fixes * Move QrSignerModal to SendTransaction container * Rework redux, use signing saga * Cleanup * Use new logo, change helpLink * Rework finalize actions and types a bit * Webcam info + wiki link on unlock screen * Make the Parity QR Signer its own component, that has error messaging and ismore robust about adding / removing cameras. * Unneded l10n
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { fromPrivateKey, fromEthSale } from 'ethereumjs-wallet';
|
|
import { fromEtherWallet } from 'ethereumjs-wallet/thirdparty';
|
|
import { signWrapper } from './helpers';
|
|
import { decryptPrivKey } from 'libs/decrypt';
|
|
import { fromV3 } from 'libs/web-workers';
|
|
import Web3Wallet from './web3';
|
|
import AddressOnlyWallet from './address';
|
|
import ParitySignerWallet from './parity';
|
|
|
|
const EncryptedPrivateKeyWallet = (encryptedPrivateKey: string, password: string) =>
|
|
signWrapper(fromPrivateKey(decryptPrivKey(encryptedPrivateKey, password)));
|
|
|
|
const PresaleWallet = (keystore: string, password: string) =>
|
|
signWrapper(fromEthSale(keystore, password));
|
|
|
|
const MewV1Wallet = (keystore: string, password: string) =>
|
|
signWrapper(fromEtherWallet(keystore, password));
|
|
|
|
const PrivKeyWallet = (privkey: Buffer) => signWrapper(fromPrivateKey(privkey));
|
|
|
|
const UtcWallet = (keystore: string, password: string) => fromV3(keystore, password, true);
|
|
|
|
export {
|
|
EncryptedPrivateKeyWallet,
|
|
PresaleWallet,
|
|
MewV1Wallet,
|
|
PrivKeyWallet,
|
|
UtcWallet,
|
|
Web3Wallet,
|
|
AddressOnlyWallet,
|
|
ParitySignerWallet
|
|
};
|