aboutsummaryrefslogtreecommitdiff
path: root/pages/confirm-create-reserve.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-12 02:55:53 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-12 02:55:53 +0200
commitd4be3906e32ac7d9933c6030d6493f2f2152bdd9 (patch)
tree3341586381b6975a3c1fa99ca69c63fba5ac9c35 /pages/confirm-create-reserve.tsx
parentdbcd85451edfc33f2e0a42c431f0cf3ab3b12876 (diff)
downloadwallet-core-d4be3906e32ac7d9933c6030d6493f2f2152bdd9.tar.xz
tree view of wallet db
Diffstat (limited to 'pages/confirm-create-reserve.tsx')
-rw-r--r--pages/confirm-create-reserve.tsx25
1 files changed, 1 insertions, 24 deletions
diff --git a/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx
index a95bc46cb..3b5a4d161 100644
--- a/pages/confirm-create-reserve.tsx
+++ b/pages/confirm-create-reserve.tsx
@@ -27,6 +27,7 @@ import {AmountJson, CreateReserveResponse} from "../lib/wallet/types";
import {ReserveCreationInfo, Amounts} from "../lib/wallet/types";
import {Denomination} from "../lib/wallet/types";
import {getReserveCreationInfo} from "../lib/wallet/wxApi";
+import {ImplicitStateComponent, StateHolder} from "../lib/components";
"use strict";
@@ -63,30 +64,6 @@ class EventTrigger {
}
-interface StateHolder<T> {
- (): T;
- (newState: T): void;
-}
-
-/**
- * Component that doesn't hold its state in one object,
- * but has multiple state holders.
- */
-abstract class ImplicitStateComponent<PropType> extends preact.Component<PropType, void> {
- makeState<StateType>(initial: StateType): StateHolder<StateType> {
- let state: StateType = initial;
- return (s?: StateType): StateType => {
- if (s !== undefined) {
- state = s;
- // In preact, this will always schedule a (debounced) redraw
- this.setState({} as any);
- }
- return state;
- };
- }
-}
-
-
function renderReserveCreationDetails(rci: ReserveCreationInfo|null) {
if (!rci) {
return <p>