From a994009d2f094c4d9c12da68dac3abb28bdef4b3 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 16 Nov 2021 13:59:53 -0300
Subject: reserveCreated new design

---
 packages/taler-wallet-webextension/src/cta/Pay.tsx | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/cta/Pay.tsx')

diff --git a/packages/taler-wallet-webextension/src/cta/Pay.tsx b/packages/taler-wallet-webextension/src/cta/Pay.tsx
index 1023013d2..d5861c47c 100644
--- a/packages/taler-wallet-webextension/src/cta/Pay.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Pay.tsx
@@ -36,7 +36,7 @@ import {
   PreparePayResult,
   PreparePayResultType,
 } from "@gnu-taler/taler-util";
-import { h, Fragment, JSX, VNode } from "preact";
+import { Fragment, h, VNode } from "preact";
 import { useEffect, useState } from "preact/hooks";
 import { LogoHeader } from "../components/LogoHeader";
 import { Part } from "../components/Part";
@@ -100,7 +100,7 @@ const doPayment = async (
   return res;
 };
 
-export function PayPage({ talerPayUri }: Props): JSX.Element {
+export function PayPage({ talerPayUri }: Props): VNode {
   const [payStatus, setPayStatus] = useState<PreparePayResult | undefined>(
     undefined,
   );
@@ -159,7 +159,7 @@ export function PayPage({ talerPayUri }: Props): JSX.Element {
     return <span>Loading payment information ...</span>;
   }
 
-  const onClick = async () => {
+  const onClick = async (): Promise<void> => {
     try {
       const res = await doPayment(payStatus);
       setPayResult(res);
@@ -198,7 +198,7 @@ export function PaymentRequestView({
   onClick,
   payErrMsg,
   balance,
-}: PaymentRequestViewProps) {
+}: PaymentRequestViewProps): VNode {
   let totalFees: AmountJson = Amounts.getZero(payStatus.amountRaw);
   const contractTerms: ContractTerms = payStatus.contractTerms;
 
@@ -225,7 +225,7 @@ export function PaymentRequestView({
     merchantName = <strong>(pub: {contractTerms.merchant_pub})</strong>;
   }
 
-  function Alternative() {
+  function Alternative(): VNode {
     const [showQR, setShowQR] = useState<boolean>(false);
     const privateUri =
       payStatus.status !== PreparePayResultType.AlreadyConfirmed
@@ -246,7 +246,7 @@ export function PaymentRequestView({
     );
   }
 
-  function ButtonsSection() {
+  function ButtonsSection(): VNode {
     if (payResult) {
       if (payResult.type === ConfirmPayResultType.Pending) {
         return (
@@ -257,7 +257,7 @@ export function PaymentRequestView({
           </section>
         );
       }
-      return null;
+      return <Fragment />;
     }
     if (payErrMsg) {
       return (
@@ -392,7 +392,7 @@ export function PaymentRequestView({
   );
 }
 
-function amountToString(text: AmountLike) {
+function amountToString(text: AmountLike): string {
   const aj = Amounts.jsonifyAmount(text);
   const amount = Amounts.stringifyValue(aj, 2);
   return `${amount} ${aj.currency}`;
-- 
cgit v1.2.3

