aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/buy_order_state_buttons.tsx
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-27 10:53:15 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-27 10:53:15 +0800
commitff295daa5c56b5c056a5faa5ca8875c317524070 (patch)
tree96e6ee707cf75e3272d90d44a8c8cf1b0567a5ce /packages/instant/src/components/buy_order_state_buttons.tsx
parentbb307a55d347c34ab51144c75721860e13659ecb (diff)
downloaddexon-sol-tools-ff295daa5c56b5c056a5faa5ca8875c317524070.tar
dexon-sol-tools-ff295daa5c56b5c056a5faa5ca8875c317524070.tar.gz
dexon-sol-tools-ff295daa5c56b5c056a5faa5ca8875c317524070.tar.bz2
dexon-sol-tools-ff295daa5c56b5c056a5faa5ca8875c317524070.tar.lz
dexon-sol-tools-ff295daa5c56b5c056a5faa5ca8875c317524070.tar.xz
dexon-sol-tools-ff295daa5c56b5c056a5faa5ca8875c317524070.tar.zst
dexon-sol-tools-ff295daa5c56b5c056a5faa5ca8875c317524070.zip
Simpler way of validaitng has enough eth
Diffstat (limited to 'packages/instant/src/components/buy_order_state_buttons.tsx')
-rw-r--r--packages/instant/src/components/buy_order_state_buttons.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/instant/src/components/buy_order_state_buttons.tsx b/packages/instant/src/components/buy_order_state_buttons.tsx
index cb5654424..8225441f7 100644
--- a/packages/instant/src/components/buy_order_state_buttons.tsx
+++ b/packages/instant/src/components/buy_order_state_buttons.tsx
@@ -7,7 +7,7 @@ import { Flex } from '../components/ui/flex';
import { PlacingOrderButton } from '../components/placing_order_button';
import { ColorOption } from '../style/theme';
-import { OrderProcessState } from '../types';
+import { OrderProcessState, ZeroExInstantError } from '../types';
import { Button } from './ui/button';
import { Text } from './ui/text';
@@ -17,13 +17,13 @@ export interface BuyOrderStateButtonProps {
buyOrderProcessingState: OrderProcessState;
assetBuyer?: AssetBuyer;
onViewTransaction: () => void;
- onAwaitingSignature: (buyQuote: BuyQuote) => void;
+ onPendingValidation: (buyQuote: BuyQuote) => void;
onSignatureDenied: (buyQuote: BuyQuote, error: Error) => void;
onBuyProcessing: (buyQuote: BuyQuote, txHash: string) => void;
onBuySuccess: (buyQuote: BuyQuote, txHash: string) => void;
onBuyFailure: (buyQuote: BuyQuote, txHash: string) => void;
onRetry: () => void;
- validateWalletBeforeBuy: (buyQuote: BuyQuote, takerAddress: string | undefined) => Promise<boolean>;
+ onValidationFail: (buyQuote: BuyQuote, error: ZeroExInstantError) => void;
}
// TODO: rename to buttons
@@ -46,7 +46,7 @@ export const BuyOrderStateButtons: React.StatelessComponent<BuyOrderStateButtonP
props.buyOrderProcessingState === OrderProcessState.PROCESSING
) {
return <SecondaryButton onClick={props.onViewTransaction}>View Transaction</SecondaryButton>;
- } else if (props.buyOrderProcessingState === OrderProcessState.AWAITING_SIGNATURE) {
+ } else if (props.buyOrderProcessingState === OrderProcessState.VALIDATING) {
return <PlacingOrderButton />;
}
@@ -54,12 +54,12 @@ export const BuyOrderStateButtons: React.StatelessComponent<BuyOrderStateButtonP
<BuyButton
buyQuote={props.buyQuote}
assetBuyer={props.assetBuyer}
- onAwaitingSignature={props.onAwaitingSignature}
+ onPendingValidation={props.onPendingValidation}
onSignatureDenied={props.onSignatureDenied}
onBuyProcessing={props.onBuyProcessing}
onBuySuccess={props.onBuySuccess}
onBuyFailure={props.onBuyFailure}
- validateWalletBeforeBuy={props.validateWalletBeforeBuy}
+ onValidationFail={props.onValidationFail}
/>
);
};