diff --git a/common/actions/transaction/actionCreators/fields.ts b/common/actions/transaction/actionCreators/fields.ts index d6a93902..e4f8d662 100644 --- a/common/actions/transaction/actionCreators/fields.ts +++ b/common/actions/transaction/actionCreators/fields.ts @@ -12,6 +12,7 @@ import { ResetAction, SetGasPriceFieldAction, SetTimeBountyFieldAction, + SetWindowSizeFieldAction, SetWindowStartFieldAction, SetScheduleTimestampFieldAction, SetScheduleTypeAction @@ -92,6 +93,14 @@ const setGasPriceField = (payload: SetGasPriceFieldAction['payload']): SetGasPri payload }); +type TSetWindowSizeField = typeof setWindowSizeField; +const setWindowSizeField = ( + payload: SetWindowSizeFieldAction['payload'] +): SetWindowSizeFieldAction => ({ + type: TypeKeys.WINDOW_SIZE_FIELD_SET, + payload +}); + type TSetWindowStartField = typeof setWindowStartField; const setWindowStartField = ( payload: SetWindowStartFieldAction['payload'] @@ -132,6 +141,7 @@ export { TSetNonceField, TSetValueField, TSetGasPriceField, + TSetWindowSizeField, TSetWindowStartField, TSetTimeBountyField, TSetScheduleTimestampField, @@ -149,6 +159,7 @@ export { setNonceField, setValueField, setGasPriceField, + setWindowSizeField, setWindowStartField, setScheduleTimestampField, setScheduleType, diff --git a/common/actions/transaction/actionCreators/index.ts b/common/actions/transaction/actionCreators/index.ts index 5e4789d6..ae21ee1d 100644 --- a/common/actions/transaction/actionCreators/index.ts +++ b/common/actions/transaction/actionCreators/index.ts @@ -5,6 +5,7 @@ export * from './sign'; export * from './broadcast'; export * from './current'; export * from './timeBounty'; +export * from './windowSize'; export * from './windowStart'; export * from './scheduleTimestamp'; export * from './scheduleType'; diff --git a/common/actions/transaction/actionCreators/windowSize.ts b/common/actions/transaction/actionCreators/windowSize.ts new file mode 100644 index 00000000..d2eee137 --- /dev/null +++ b/common/actions/transaction/actionCreators/windowSize.ts @@ -0,0 +1,12 @@ +import { SetCurrentWindowSizeAction } from '../actionTypes/windowSize'; +import { TypeKeys } from '../'; + +type TSetCurrentWindowSize = typeof setCurrentWindowSize; +const setCurrentWindowSize = ( + payload: SetCurrentWindowSizeAction['payload'] +): SetCurrentWindowSizeAction => ({ + type: TypeKeys.CURRENT_WINDOW_SIZE_SET, + payload +}); + +export { setCurrentWindowSize, TSetCurrentWindowSize }; diff --git a/common/actions/transaction/actionTypes/fields.ts b/common/actions/transaction/actionTypes/fields.ts index 8adf61a0..2a4ac2d4 100644 --- a/common/actions/transaction/actionTypes/fields.ts +++ b/common/actions/transaction/actionTypes/fields.ts @@ -91,6 +91,14 @@ interface SetValueFieldAction { }; } +interface SetWindowSizeFieldAction { + type: TypeKeys.WINDOW_SIZE_FIELD_SET; + payload: { + raw: string; + value: number | null; + }; +} + interface SetWindowStartFieldAction { type: TypeKeys.WINDOW_START_FIELD_SET; payload: { @@ -125,6 +133,7 @@ type FieldAction = | SetValueFieldAction | SetGasPriceFieldAction | SetTimeBountyFieldAction + | SetWindowSizeFieldAction | SetWindowStartFieldAction | SetScheduleTimestampFieldAction | SetScheduleTypeAction; @@ -146,6 +155,7 @@ export { InputFieldAction, SetGasPriceFieldAction, SetTimeBountyFieldAction, + SetWindowSizeFieldAction, SetWindowStartFieldAction, SetScheduleTimestampFieldAction, SetScheduleTypeAction diff --git a/common/actions/transaction/actionTypes/windowSize.ts b/common/actions/transaction/actionTypes/windowSize.ts new file mode 100644 index 00000000..3094ccea --- /dev/null +++ b/common/actions/transaction/actionTypes/windowSize.ts @@ -0,0 +1,12 @@ +import { TypeKeys } from '../constants'; + +/* user input */ + +interface SetCurrentWindowSizeAction { + type: TypeKeys.CURRENT_WINDOW_SIZE_SET; + payload: string; +} + +type CurrentAction = SetCurrentWindowSizeAction; + +export { SetCurrentWindowSizeAction, CurrentAction }; diff --git a/common/actions/transaction/constants.ts b/common/actions/transaction/constants.ts index f0fcc2bc..ebb13552 100644 --- a/common/actions/transaction/constants.ts +++ b/common/actions/transaction/constants.ts @@ -26,6 +26,7 @@ export enum TypeKeys { CURRENT_VALUE_SET = 'CURRENT_VALUE_SET', CURRENT_TO_SET = 'CURRENT_TO_SET', CURRENT_TIME_BOUNTY_SET = 'CURRENT_TIME_BOUNTY_SET', + CURRENT_WINDOW_SIZE_SET = 'CURRENT_WINDOW_SIZE_SET', CURRENT_WINDOW_START_SET = 'CURRENT_WINDOW_START_SET', CURRENT_SCHEDULE_TIMESTAMP_SET = 'CURRENT_SCHEDULE_TIMESTAMP_SET', CURRENT_SCHEDULE_TYPE = 'CURRENT_SCHEDULE_TYPE', @@ -45,6 +46,7 @@ export enum TypeKeys { NONCE_FIELD_SET = 'NONCE_FIELD_SET', GAS_PRICE_FIELD_SET = 'GAS_PRICE_FIELD_SET', TIME_BOUNTY_FIELD_SET = 'TIME_BOUNTY_FIELD_SET', + WINDOW_SIZE_FIELD_SET = 'WINDOW_SIZE_FIELD_SET', WINDOW_START_FIELD_SET = 'WINDOW_START_FIELD_SET', SCHEDULE_TIMESTAMP_FIELD_SET = 'SCHEDULE_TIMESTAMP_FIELD_SET', SCHEDULE_TIMEZONE_SET = 'SCHEDULE_TIMEZONE_SET', diff --git a/common/components/ExtendedNotifications/TransactionSucceeded.tsx b/common/components/ExtendedNotifications/TransactionSucceeded.tsx index 06a96d74..e6bc1797 100644 --- a/common/components/ExtendedNotifications/TransactionSucceeded.tsx +++ b/common/components/ExtendedNotifications/TransactionSucceeded.tsx @@ -25,7 +25,7 @@ const TransactionSucceeded = ({ txHash, blockExplorer, scheduling }: Transaction if (scheduling) { scheduleDetailsBtn = ( - {translate('SCHEDULE_check')} + {translate('SCHEDULE_CHECK')} ); } diff --git a/common/components/ScheduleTimezoneDropDown/ScheduleTimezoneDropDown.tsx b/common/components/ScheduleTimezoneDropDown/ScheduleTimezoneDropDown.tsx index 8d34a6c6..bdef8b67 100644 --- a/common/components/ScheduleTimezoneDropDown/ScheduleTimezoneDropDown.tsx +++ b/common/components/ScheduleTimezoneDropDown/ScheduleTimezoneDropDown.tsx @@ -20,7 +20,7 @@ class ScheduleTimezoneDropDownClass extends Component { return (
@@ -47,7 +47,7 @@ class ScheduleTypeClass extends Component { onChange={this.handleOnChange} checked={currentScheduleType.value === 'block'} /> - {translate('SCHEDULE_type_block')} + {translate('SCHEDULE_TYPE_BLOCK')} diff --git a/common/components/renderCbs/Query.tsx b/common/components/renderCbs/Query.tsx index 369711c3..99b2d0ae 100644 --- a/common/components/renderCbs/Query.tsx +++ b/common/components/renderCbs/Query.tsx @@ -21,6 +21,7 @@ export type Param = | 'value' | 'gaslimit' | 'limit' + | 'windowSize' | 'windowStart' | 'scheduleTimestamp' | 'timeBounty'; diff --git a/common/containers/Tabs/ScheduleTransaction/components/Fields/TimeBounty/TimeBountyField.tsx b/common/containers/Tabs/ScheduleTransaction/components/Fields/TimeBounty/TimeBountyField.tsx index bf3dd531..24f8f3ee 100644 --- a/common/containers/Tabs/ScheduleTransaction/components/Fields/TimeBounty/TimeBountyField.tsx +++ b/common/containers/Tabs/ScheduleTransaction/components/Fields/TimeBounty/TimeBountyField.tsx @@ -12,12 +12,12 @@ export const TimeBountyField: React.SFC = ({ isReadOnly }) => ( withProps={({ currentTimeBounty, isValid, onChange, readOnly }) => (