mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-11 18:47:03 +00:00
30 lines
900 B
TypeScript
30 lines
900 B
TypeScript
import { getWalletType } from 'selectors/wallet';
|
|
import { connect } from 'react-redux';
|
|
import { AppState } from 'reducers';
|
|
import {
|
|
getSerializedTransaction,
|
|
isNetworkRequestPending,
|
|
isValidGasPrice,
|
|
isValidGasLimit,
|
|
getSignedTx,
|
|
getWeb3Tx,
|
|
getSchedulingTransaction
|
|
} from 'selectors/transaction';
|
|
import { SendButtonFactoryClass } from 'components/SendButtonFactory';
|
|
|
|
const mapStateToProps = (state: AppState) => {
|
|
return {
|
|
walletType: getWalletType(state),
|
|
serializedTransaction: getSerializedTransaction(state),
|
|
...getSchedulingTransaction(state),
|
|
networkRequestPending: isNetworkRequestPending(state),
|
|
validGasPrice: isValidGasPrice(state),
|
|
validGasLimit: isValidGasLimit(state),
|
|
signedTx: !!getSignedTx(state) || !!getWeb3Tx(state)
|
|
};
|
|
};
|
|
|
|
export const SendScheduleTransactionButtonFactory = connect(mapStateToProps)(
|
|
SendButtonFactoryClass
|
|
);
|