add redirect to withdraw

This commit is contained in:
Sebastian 2022-09-10 23:53:48 -03:00
parent e4f3acfeb2
commit 50c4cdabc1
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
2 changed files with 14 additions and 21 deletions

View File

@ -167,14 +167,16 @@ export function BaseView(state: SupportedStates): VNode {
/>
)}
</section>
<ButtonsSection
amount={state.amount}
balance={state.balance}
payStatus={state.payStatus}
uri={state.uri}
payHandler={state.status === "ready" ? state.payHandler : undefined}
goToWalletManualWithdraw={state.goToWalletManualWithdraw}
/>
{state.status !== "completed" ? (
<ButtonsSection
amount={state.amount}
balance={state.balance}
payStatus={state.payStatus}
uri={state.uri}
payHandler={state.status === "ready" ? state.payHandler : undefined}
goToWalletManualWithdraw={state.goToWalletManualWithdraw}
/>
) : undefined}
<section>
<Link upperCased onClick={state.cancel}>
<i18n.Translate>Cancel</i18n.Translate>
@ -433,19 +435,7 @@ export function ButtonsSection({
);
}
// if (state.status === "completed") {
// if (state.payResult.type === ConfirmPayResultType.Pending) {
// return (
// <section>
// <div>
// <p>
// <i18n.Translate>Processing</i18n.Translate>...
// </p>
// </div>
// </section>
// );
// }
// }
const error: never = payStatus;
return <Fragment />;
}

View File

@ -288,6 +288,9 @@ export function Application(): VNode {
<Route
path={Pages.ctaInvoicePay}
component={InvoicePayPage}
goToWalletManualWithdraw={(amount?: string) =>
redirectTo(Pages.ctaWithdrawManual({ amount }))
}
onClose={() => redirectTo(Pages.balance)}
/>
<Route