aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/buy_order_state_buttons.tsx
diff options
context:
space:
mode:
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}
/>
);
};