aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-20 04:51:57 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-20 04:51:57 +0800
commit6c79a858dff2766917ee3a4b5d4f623b66dadd17 (patch)
tree80ed81159418eaa9f57deff046d4376a5cc349ae /packages/instant/src/components
parent17b282b1d743c83a4a4378eb71df098949569bdd (diff)
downloaddexon-sol-tools-6c79a858dff2766917ee3a4b5d4f623b66dadd17.tar
dexon-sol-tools-6c79a858dff2766917ee3a4b5d4f623b66dadd17.tar.gz
dexon-sol-tools-6c79a858dff2766917ee3a4b5d4f623b66dadd17.tar.bz2
dexon-sol-tools-6c79a858dff2766917ee3a4b5d4f623b66dadd17.tar.lz
dexon-sol-tools-6c79a858dff2766917ee3a4b5d4f623b66dadd17.tar.xz
dexon-sol-tools-6c79a858dff2766917ee3a4b5d4f623b66dadd17.tar.zst
dexon-sol-tools-6c79a858dff2766917ee3a4b5d4f623b66dadd17.zip
WIP: clear buy quote working
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r--packages/instant/src/components/asset_button.tsx10
1 files changed, 3 insertions, 7 deletions
diff --git a/packages/instant/src/components/asset_button.tsx b/packages/instant/src/components/asset_button.tsx
index 84a27303d..4ae7a2704 100644
--- a/packages/instant/src/components/asset_button.tsx
+++ b/packages/instant/src/components/asset_button.tsx
@@ -9,6 +9,7 @@ import { BuyButton } from './buy_button';
import { RetryButton } from './retry_button';
import { Container } from './ui';
+// TODO: split into sepearte components? getting really big..
interface AssetButtonProps {
assetBuyer?: AssetBuyer;
buyQuote?: BuyQuote;
@@ -16,6 +17,7 @@ interface AssetButtonProps {
onBuyClick: (buyQuote: BuyQuote) => void;
onBuySuccess: (buyQuote: BuyQuote) => void;
onBuyFailure: (buyQuote: BuyQuote) => void;
+ onRetryClick: () => void;
}
export class AssetButton extends React.Component<AssetButtonProps, {}> {
@@ -30,13 +32,7 @@ export class AssetButton extends React.Component<AssetButtonProps, {}> {
// TODO: figure out why buyOrderState is undefined in beginning, get rid of default
switch (this.props.buyOrderState) {
case AsyncProcessState.FAILURE:
- return (
- <RetryButton
- onClick={() => {
- console.log('try again');
- }}
- />
- );
+ return <RetryButton onClick={this.props.onRetryClick} />;
case AsyncProcessState.SUCCESS:
return <div />;
default: