aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-09-16 16:03:58 -0300
committerSebastian <sebasjm@gmail.com>2022-09-16 16:03:58 -0300
commit59d235e8d29159bc8caccf8bee6a2bca8b0b90dc (patch)
tree551261c860b1989dc0b1a05ddcfd53d20e561626 /packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts
parent6ddb2de84245ae3914c92b2b2eb7399e7f04500e (diff)
downloadwallet-core-59d235e8d29159bc8caccf8bee6a2bca8b0b90dc.tar.xz
redirect after success #7357
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts')
-rw-r--r--packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts10
1 files changed, 2 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts
index fe0b0f5f7..f7d6fbe63 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts
+++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts
@@ -17,7 +17,7 @@
import { Loading } from "../../components/Loading.js";
import { HookError } from "../../hooks/useAsyncAsHook.js";
import { compose, StateViewMap } from "../../utils/index.js";
-import { LoadingUriView, ReadyView, CreatedView } from "./views.js";
+import { LoadingUriView, ReadyView } from "./views.js";
import * as wxApi from "../../wxApi.js";
import { useComponentState } from "./state.js";
import { AmountJson, TalerErrorDetail } from "@gnu-taler/taler-util";
@@ -26,12 +26,12 @@ import { ButtonHandler, TextFieldHandler } from "../../mui/handlers.js";
export interface Props {
amount: string;
onClose: () => Promise<void>;
+ onSuccess: (tx: string) => Promise<void>;
}
export type State =
| State.Loading
| State.LoadingUriError
- | State.Created
| State.Ready;
export namespace State {
@@ -49,11 +49,6 @@ export namespace State {
error: undefined;
cancel: ButtonHandler;
}
- export interface Created extends BaseInfo {
- status: "created";
- talerUri: string;
- copyToClipboard: ButtonHandler;
- }
export interface Ready extends BaseInfo {
status: "ready";
create: ButtonHandler;
@@ -70,7 +65,6 @@ export namespace State {
const viewMapping: StateViewMap<State> = {
loading: Loading,
"loading-uri": LoadingUriView,
- created: CreatedView,
ready: ReadyView,
};