diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-19 23:27:46 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-19 23:27:46 +0200 |
commit | 9fbf208aab2f29687e7971b9882779f846e3e1d4 (patch) | |
tree | 3771c57f00838f5a6b51cb7fe5c2534b600f5022 | |
parent | 6a11b512b3b0b528bf51fe55861a9cffa0325e19 (diff) | |
download | wallet-core-9fbf208aab2f29687e7971b9882779f846e3e1d4.tar.xz |
spacing
-rw-r--r-- | pages/confirm-contract.tsx | 14 | ||||
-rw-r--r-- | popup/popup.tsx | 3 |
2 files changed, 13 insertions, 4 deletions
diff --git a/pages/confirm-contract.tsx b/pages/confirm-contract.tsx index 5867051ac..91f4c2e82 100644 --- a/pages/confirm-contract.tsx +++ b/pages/confirm-contract.tsx @@ -44,20 +44,28 @@ interface DetailProps { class Details extends preact.Component<DetailProps, DetailState> { constructor(props: DetailProps) { super(props); - this.state = { + this.setState({ collapsed: props.collapsed, exchanges: null - }; + }); + + console.log("initial state:", this.state); this.update(); } + componentWillReceiveProps(props: DetailProps) { + this.setState({collapsed: props.collapsed} as any); + } + async update() { let exchanges = await getExchanges(); this.setState({exchanges} as any); } render(props: DetailProps, state: DetailState) { + console.log("details collapsed (state)", state.collapsed); + console.log("details collapsed (prop)", props.collapsed); if (state.collapsed) { return ( <div> @@ -141,7 +149,7 @@ class ContractPrompt extends preact.Component<ContractPromptProps, ContractPromp this.state.payDisabled = false; this.state.error = null; } - this.forceUpdate(); + this.setState({} as any); window.setTimeout(() => this.checkPayment(), 300); }); } diff --git a/popup/popup.tsx b/popup/popup.tsx index 121562e31..d58aa1dd3 100644 --- a/popup/popup.tsx +++ b/popup/popup.tsx @@ -217,7 +217,8 @@ class WalletBalanceView extends preact.Component<any, any> { help </ExtensionLink> ); - return <div>You have no balance to show. Need some {helpLink} + return <div>You have no balance to show. Need some + {" "}{helpLink}{" "} getting started?</div>; } |