diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-26 04:18:17 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-26 04:18:17 +0800 |
commit | acefeff5f08f123c7c5d372088f2af016e31c599 (patch) | |
tree | a6c30ee817baac36df47a84402e671fcf7595a19 /packages/instant/src/containers | |
parent | 45d828e154b5400710582d1f5414f7446e8d3688 (diff) | |
download | dexon-sol-tools-acefeff5f08f123c7c5d372088f2af016e31c599.tar dexon-sol-tools-acefeff5f08f123c7c5d372088f2af016e31c599.tar.gz dexon-sol-tools-acefeff5f08f123c7c5d372088f2af016e31c599.tar.bz2 dexon-sol-tools-acefeff5f08f123c7c5d372088f2af016e31c599.tar.lz dexon-sol-tools-acefeff5f08f123c7c5d372088f2af016e31c599.tar.xz dexon-sol-tools-acefeff5f08f123c7c5d372088f2af016e31c599.tar.zst dexon-sol-tools-acefeff5f08f123c7c5d372088f2af016e31c599.zip |
new try/catch pattern and new prop names per code review feedback
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r-- | packages/instant/src/containers/selected_asset_buy_button.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/instant/src/containers/selected_asset_buy_button.ts b/packages/instant/src/containers/selected_asset_buy_button.ts index f55254daf..17cc1a770 100644 --- a/packages/instant/src/containers/selected_asset_buy_button.ts +++ b/packages/instant/src/containers/selected_asset_buy_button.ts @@ -19,10 +19,10 @@ interface ConnectedState { interface ConnectedDispatch { onAwaitingSignature: (buyQuote: BuyQuote) => void; - onProcessingTransaction: (buyQuote: BuyQuote, txnHash: string) => void; + onSignatureDenied: (buyQuote: BuyQuote, error: Error) => void; + onBuyProcessing: (buyQuote: BuyQuote, txnHash: string) => void; onBuySuccess: (buyQuote: BuyQuote, txnHash: string) => void; onBuyFailure: (buyQuote: BuyQuote) => void; - onBuyPrevented: (buyQuote: BuyQuote, error: Error) => void; } const mapStateToProps = (state: State, _ownProps: SelectedAssetBuyButtonProps): ConnectedState => ({ @@ -35,14 +35,14 @@ const mapDispatchToProps = (dispatch: Dispatch<Action>, ownProps: SelectedAssetB const newOrderState: OrderState = { processState: OrderProcessState.AWAITING_SIGNATURE }; dispatch(actions.updateBuyOrderState(newOrderState)); }, - onProcessingTransaction: (buyQuote: BuyQuote, txnHash: string) => { + onBuyProcessing: (buyQuote: BuyQuote, txnHash: string) => { const newOrderState: OrderState = { processState: OrderProcessState.PROCESSING, txnHash }; dispatch(actions.updateBuyOrderState(newOrderState)); }, onBuySuccess: (buyQuote: BuyQuote, txnHash: string) => dispatch(actions.updateBuyOrderState({ processState: OrderProcessState.SUCCESS, txnHash })), onBuyFailure: buyQuote => dispatch(actions.updateBuyOrderState({ processState: OrderProcessState.FAILURE })), - onBuyPrevented: (buyQuote, error) => { + onSignatureDenied: (buyQuote, error) => { dispatch(actions.resetAmount()); dispatch(actions.setError(error)); }, |