aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-03 04:25:59 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-03 04:25:59 +0800
commitb0f2ab45e9761cc760b94d8567df8ba66956388c (patch)
tree65e72491c4a23d0f1017ed35754a27a065cf09ed /packages/instant
parent620f439816b8c62edb5f0e2e140647176b8702c8 (diff)
downloaddexon-sol-tools-b0f2ab45e9761cc760b94d8567df8ba66956388c.tar
dexon-sol-tools-b0f2ab45e9761cc760b94d8567df8ba66956388c.tar.gz
dexon-sol-tools-b0f2ab45e9761cc760b94d8567df8ba66956388c.tar.bz2
dexon-sol-tools-b0f2ab45e9761cc760b94d8567df8ba66956388c.tar.lz
dexon-sol-tools-b0f2ab45e9761cc760b94d8567df8ba66956388c.tar.xz
dexon-sol-tools-b0f2ab45e9761cc760b94d8567df8ba66956388c.tar.zst
dexon-sol-tools-b0f2ab45e9761cc760b94d8567df8ba66956388c.zip
onChange -> onAmountChange
Diffstat (limited to 'packages/instant')
-rw-r--r--packages/instant/src/components/erc20_asset_amount_input.tsx2
-rw-r--r--packages/instant/src/components/scaling_amount_input.tsx8
2 files changed, 5 insertions, 5 deletions
diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx
index a67d7d5db..6fb8f60f0 100644
--- a/packages/instant/src/components/erc20_asset_amount_input.tsx
+++ b/packages/instant/src/components/erc20_asset_amount_input.tsx
@@ -54,7 +54,7 @@ export class ERC20AssetAmountInput extends React.Component<ERC20AssetAmountInput
{...rest}
textLengthThreshold={this._textLengthThresholdForAsset(asset)}
maxFontSizePx={this.props.startingFontSizePx}
- onChange={this._handleChange}
+ onAmountChange={this._handleChange}
onFontSizeChange={this._handleFontSizeChange}
/>
</Container>
diff --git a/packages/instant/src/components/scaling_amount_input.tsx b/packages/instant/src/components/scaling_amount_input.tsx
index a30c64b3a..ff74ccb4d 100644
--- a/packages/instant/src/components/scaling_amount_input.tsx
+++ b/packages/instant/src/components/scaling_amount_input.tsx
@@ -15,7 +15,7 @@ export interface ScalingAmountInputProps {
textLengthThreshold: number;
fontColor?: ColorOption;
value?: BigNumber;
- onChange: (value?: BigNumber) => void;
+ onAmountChange: (value?: BigNumber) => void;
onFontSizeChange: (fontSizePx: number) => void;
}
interface ScalingAmountInputState {
@@ -25,7 +25,7 @@ interface ScalingAmountInputState {
const { stringToMaybeBigNumber, areMaybeBigNumbersEqual } = maybeBigNumberUtil;
export class ScalingAmountInput extends React.Component<ScalingAmountInputProps, ScalingAmountInputState> {
public static defaultProps = {
- onChange: util.boundNoop,
+ onAmountChange: util.boundNoop,
onFontSizeChange: util.boundNoop,
isDisabled: false,
};
@@ -72,11 +72,11 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps,
stringValue: sanitizedValue,
});
- // Trigger onChange with a valid BigNumber, or undefined if the sanitizedValue is invalid or empty
+ // Trigger onAmountChange with a valid BigNumber, or undefined if the sanitizedValue is invalid or empty
const bigNumberValue: MaybeBigNumber = _.isEmpty(sanitizedValue)
? undefined
: stringToMaybeBigNumber(sanitizedValue);
- this.props.onChange(bigNumberValue);
+ this.props.onAmountChange(bigNumberValue);
};
}