aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-11-08 10:02:24 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-11-08 15:41:25 +0800
commitd0c009adff53d94414cf51028eff490e0452a3c9 (patch)
tree82a76e2499883d9a8a579b64b6503ef108d7706c /packages/instant/src/containers
parentf6abc007ffb249e4bbf85b8a7a77309d43e0a147 (diff)
downloaddexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.tar
dexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.tar.gz
dexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.tar.bz2
dexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.tar.lz
dexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.tar.xz
dexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.tar.zst
dexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.zip
feat(instant): fetch account address at startup and drive account state changes
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts b/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts
index c3a5e88b9..2678d4a36 100644
--- a/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts
+++ b/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts
@@ -7,11 +7,12 @@ import { Dispatch } from 'redux';
import { BuyOrderStateButtons } from '../components/buy_order_state_buttons';
import { Action, actions } from '../redux/actions';
import { State } from '../redux/reducer';
-import { AffiliateInfo, OrderProcessState, ZeroExInstantError } from '../types';
+import { AccountState, AffiliateInfo, OrderProcessState, ZeroExInstantError } from '../types';
import { errorFlasher } from '../util/error_flasher';
import { etherscanUtil } from '../util/etherscan';
interface ConnectedState {
+ accountAddress?: string;
buyQuote?: BuyQuote;
buyOrderProcessingState: OrderProcessState;
assetBuyer: AssetBuyer;
@@ -31,7 +32,10 @@ interface ConnectedDispatch {
export interface SelectedAssetBuyOrderStateButtons {}
const mapStateToProps = (state: State, _ownProps: SelectedAssetBuyOrderStateButtons): ConnectedState => {
const assetBuyer = state.providerState.assetBuyer;
+ const account = state.providerState.account;
+ const accountAddress = account.state === AccountState.Ready ? account.address : undefined;
return {
+ accountAddress,
buyOrderProcessingState: state.buyOrderState.processState,
assetBuyer,
buyQuote: state.latestBuyQuote,