From dfbf10c94bfbbdbca353531c5cae6707e05981f0 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 6 Nov 2018 20:25:30 -0800 Subject: feat(instant): fallback to an empty wallet provider when none is injected --- packages/instant/src/components/buy_button.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'packages/instant/src/components/buy_button.tsx') diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx index e6d50de96..515cd18e9 100644 --- a/packages/instant/src/components/buy_button.tsx +++ b/packages/instant/src/components/buy_button.tsx @@ -17,7 +17,7 @@ import { Text } from './ui/text'; export interface BuyButtonProps { buyQuote?: BuyQuote; - assetBuyer?: AssetBuyer; + assetBuyer: AssetBuyer; affiliateInfo?: AffiliateInfo; onValidationPending: (buyQuote: BuyQuote) => void; onValidationFail: (buyQuote: BuyQuote, errorMessage: AssetBuyerError | ZeroExInstantError) => void; @@ -34,7 +34,7 @@ export class BuyButton extends React.Component { onBuyFailure: util.boundNoop, }; public render(): React.ReactNode { - const shouldDisableButton = _.isUndefined(this.props.buyQuote) || _.isUndefined(this.props.assetBuyer); + const shouldDisableButton = _.isUndefined(this.props.buyQuote); return (