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 { 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 (
@@ -141,7 +149,7 @@ class ContractPrompt extends preact.Component 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 { help ); - return
You have no balance to show. Need some {helpLink} + return
You have no balance to show. Need some + {" "}{helpLink}{" "} getting started?
; }