mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-11 02:27:04 +00:00
99 lines
2.8 KiB
TypeScript
99 lines
2.8 KiB
TypeScript
import { connect } from 'react-redux';
|
|
import React from 'react';
|
|
import { AppState } from 'reducers';
|
|
import { getCurrentScheduleType, ICurrentScheduleType } from 'selectors/transaction';
|
|
import {
|
|
WindowSizeField,
|
|
TimeBountyField,
|
|
WindowStartField,
|
|
ScheduleGasPriceField,
|
|
ScheduleGasLimitField,
|
|
ScheduleDepositField
|
|
} from '.';
|
|
import { ScheduleTimezoneDropDown, ScheduleTimestampField, ScheduleType } from 'components';
|
|
import './ScheduleFields.scss';
|
|
import translate from 'translations';
|
|
|
|
interface Props {
|
|
schedulingType: ICurrentScheduleType;
|
|
}
|
|
|
|
class ScheduleFieldsClass extends React.Component<Props> {
|
|
public render() {
|
|
const { schedulingType } = this.props;
|
|
|
|
return (
|
|
<div className="scheduled-tx-settings">
|
|
<div className="scheduled-tx-settings_title">{translate('SCHEDULING_TITLE')}</div>
|
|
|
|
<div className="scheduled-tx-settings_description">
|
|
{translate('SCHEDULING_DESCRIPTION')}
|
|
</div>
|
|
|
|
<div className="row form-group vcenter-sm">
|
|
<div className="col-lg-3 col-lg-push-9">
|
|
<ScheduleType />
|
|
<hr className="hidden-lg" />
|
|
</div>
|
|
|
|
{schedulingType.value === 'time' && (
|
|
<>
|
|
<div className="col-md-5 col-lg-3 col-lg-pull-3">
|
|
<ScheduleTimestampField />
|
|
</div>
|
|
<div className="col-md-4 col-lg-3 col-lg-pull-3">
|
|
<ScheduleTimezoneDropDown />
|
|
</div>
|
|
</>
|
|
)}
|
|
|
|
{schedulingType.value === 'block' && (
|
|
<>
|
|
<div className="col-md-9 col-lg-6 col-lg-pull-3">
|
|
<WindowStartField />
|
|
</div>
|
|
</>
|
|
)}
|
|
|
|
<div className="col-md-3 col-lg-3 col-lg-pull-3">
|
|
<WindowSizeField />
|
|
</div>
|
|
</div>
|
|
|
|
<div className="row form-group">
|
|
<div className="col-xs-6">
|
|
<TimeBountyField />
|
|
</div>
|
|
<div className="col-xs-6">
|
|
<ScheduleDepositField />
|
|
</div>
|
|
</div>
|
|
|
|
<div className="row form-group">
|
|
<div className="col-xs-6">
|
|
<ScheduleGasPriceField />
|
|
</div>
|
|
<div className="col-xs-6">
|
|
<ScheduleGasLimitField />
|
|
</div>
|
|
</div>
|
|
|
|
<div className="row">
|
|
<div className="col-12">
|
|
<a
|
|
href="https://blog.chronologic.network/announcing-the-ethereum-alarm-clock-chronologic-partnership-b3d7545bea3b"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="scheduled-tx-settings_logo"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export const ScheduleFields = connect((state: AppState) => ({
|
|
schedulingType: getCurrentScheduleType(state)
|
|
}))(ScheduleFieldsClass);
|