aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-25 01:38:56 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-25 01:38:56 +0800
commitce5bc3c1c945b12997e3030301bf25f982c55365 (patch)
tree25f561a8fbedd15c83979666123020604174a600 /packages/instant/src/containers
parent33d8044f028b16e3e48ee963790aa840f3191803 (diff)
downloaddexon-sol-tools-ce5bc3c1c945b12997e3030301bf25f982c55365.tar
dexon-sol-tools-ce5bc3c1c945b12997e3030301bf25f982c55365.tar.gz
dexon-sol-tools-ce5bc3c1c945b12997e3030301bf25f982c55365.tar.bz2
dexon-sol-tools-ce5bc3c1c945b12997e3030301bf25f982c55365.tar.lz
dexon-sol-tools-ce5bc3c1c945b12997e3030301bf25f982c55365.tar.xz
dexon-sol-tools-ce5bc3c1c945b12997e3030301bf25f982c55365.tar.zst
dexon-sol-tools-ce5bc3c1c945b12997e3030301bf25f982c55365.zip
Message when signature denied
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/selected_asset_buy_button.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/instant/src/containers/selected_asset_buy_button.ts b/packages/instant/src/containers/selected_asset_buy_button.ts
index 71d2b8cf0..428939e79 100644
--- a/packages/instant/src/containers/selected_asset_buy_button.ts
+++ b/packages/instant/src/containers/selected_asset_buy_button.ts
@@ -21,6 +21,7 @@ interface ConnectedDispatch {
onClick: (buyQuote: BuyQuote) => void;
onBuySuccess: (buyQuote: BuyQuote, txnHash: string) => void;
onBuyFailure: (buyQuote: BuyQuote) => void;
+ onBuyPrevented: (buyQuote: BuyQuote, error: Error) => void;
}
const mapStateToProps = (state: State, _ownProps: SelectedAssetBuyButtonProps): ConnectedState => ({
@@ -33,6 +34,10 @@ const mapDispatchToProps = (dispatch: Dispatch<Action>, ownProps: SelectedAssetB
onBuySuccess: (buyQuote: BuyQuote, txnHash: string) =>
dispatch(actions.updateBuyOrderState({ processState: AsyncProcessState.SUCCESS, txnHash })),
onBuyFailure: buyQuote => dispatch(actions.updateBuyOrderState({ processState: AsyncProcessState.FAILURE })),
+ onBuyPrevented: (buyQuote, error) => {
+ dispatch(actions.resetAmount());
+ dispatch(actions.setError(error));
+ },
});
export const SelectedAssetBuyButton: React.ComponentClass<SelectedAssetBuyButtonProps> = connect(