feat(instant): input to trigger error for rollbar testing
This commit is contained in:
parent
1b4c477ddb
commit
1cc043d7a9
@ -4,6 +4,7 @@ import * as React from 'react';
|
|||||||
|
|
||||||
import { Maybe } from '../types';
|
import { Maybe } from '../types';
|
||||||
|
|
||||||
|
import { MAGIC_TRIGGER_ERROR_INPUT } from '../constants';
|
||||||
import { ColorOption } from '../style/theme';
|
import { ColorOption } from '../style/theme';
|
||||||
import { maybeBigNumberUtil } from '../util/maybe_big_number';
|
import { maybeBigNumberUtil } from '../util/maybe_big_number';
|
||||||
import { util } from '../util/util';
|
import { util } from '../util/util';
|
||||||
@ -71,6 +72,10 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
private readonly _handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
private readonly _handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
||||||
|
if (event.target.value === MAGIC_TRIGGER_ERROR_INPUT) {
|
||||||
|
throw new Error('Triggered error');
|
||||||
|
}
|
||||||
|
|
||||||
const sanitizedValue = event.target.value.replace(/[^0-9.]/g, ''); // only allow numbers and "."
|
const sanitizedValue = event.target.value.replace(/[^0-9.]/g, ''); // only allow numbers and "."
|
||||||
this.setState({
|
this.setState({
|
||||||
stringValue: sanitizedValue,
|
stringValue: sanitizedValue,
|
||||||
|
@ -17,6 +17,7 @@ export const ACCOUNT_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 5;
|
|||||||
export const BUY_QUOTE_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 15;
|
export const BUY_QUOTE_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 15;
|
||||||
export const DEFAULT_GAS_PRICE = GWEI_IN_WEI.mul(6);
|
export const DEFAULT_GAS_PRICE = GWEI_IN_WEI.mul(6);
|
||||||
export const DEFAULT_ESTIMATED_TRANSACTION_TIME_MS = ONE_MINUTE_MS * 2;
|
export const DEFAULT_ESTIMATED_TRANSACTION_TIME_MS = ONE_MINUTE_MS * 2;
|
||||||
|
export const MAGIC_TRIGGER_ERROR_INPUT = '0`';
|
||||||
export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info';
|
export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info';
|
||||||
export const HEAP_ANALYTICS_ID = process.env.HEAP_ANALYTICS_ID;
|
export const HEAP_ANALYTICS_ID = process.env.HEAP_ANALYTICS_ID;
|
||||||
export const HEAP_ENABLED = process.env.HEAP_ENABLED;
|
export const HEAP_ENABLED = process.env.HEAP_ENABLED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user