gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant-backoffice] 02/02: mocks after taler-local


From: gnunet
Subject: [taler-merchant-backoffice] 02/02: mocks after taler-local
Date: Thu, 07 Apr 2022 07:34:18 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository merchant-backoffice.

commit b3cf0bd0a9525405b4f9e2db1cd7a006833ed9d5
Author: ms <ms@taler.net>
AuthorDate: Thu Apr 7 07:34:08 2022 +0200

    mocks after taler-local
---
 packages/bank/mocks/window.js          |  4 ++--
 packages/bank/package.json             |  2 +-
 packages/bank/src/pages/home/index.tsx | 19 +++++++++++--------
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/packages/bank/mocks/window.js b/packages/bank/mocks/window.js
index c6185fa..f396ff9 100644
--- a/packages/bank/mocks/window.js
+++ b/packages/bank/mocks/window.js
@@ -18,9 +18,9 @@ Object.defineProperty(window, 'localStorage', {
 });
 Object.defineProperty(window, 'location', {
   value: {
-    origin: "http://localhost:5000";,
+    origin: "http://localhost:8080";, /* where taler-local rev proxy listens to 
*/
     search: "",
-    pathname: "/demobanks/default",
+    pathname: "/sandbox/demobanks/default",
   }
 })
 
diff --git a/packages/bank/package.json b/packages/bank/package.json
index 18c6adc..646322b 100644
--- a/packages/bank/package.json
+++ b/packages/bank/package.json
@@ -4,7 +4,7 @@
   "version": "0.1.0",
   "license": "MIT",
   "scripts": {
-    "dev": "preact watch --port ${PORT:=8080} --no-sw --no-esm -c 
preact.mock.js",
+    "dev": "preact watch --port ${PORT:=9090} --no-sw --no-esm -c 
preact.mock.js",
     "build": "preact build --no-sw --no-esm -c preact.single-config.js --dest 
build && sh remove-link-stylesheet.sh",
     "serve": "sirv build --port ${PORT:=8080} --cors --single",
     "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
diff --git a/packages/bank/src/pages/home/index.tsx 
b/packages/bank/src/pages/home/index.tsx
index 0c08c87..070b78b 100644
--- a/packages/bank/src/pages/home/index.tsx
+++ b/packages/bank/src/pages/home/index.tsx
@@ -887,7 +887,7 @@ function TalerWithdrawalQRCode(Props: any): VNode {
   var captchaAnswer = "";
   // fall here as long as the wallet did NOT communicate:
   if (typeof error !== "undefined") {
-    console.log("transactions not found error", error);
+    console.log("withdraw details not arrived at the bank...", error);
     switch(error.status) {
       case 404: {
         return (<section id="main" class="content">
@@ -895,12 +895,12 @@ function TalerWithdrawalQRCode(Props: any): VNode {
           <p>{i18n`You can use this QR code to withdraw to your mobile 
wallet:`}</p>
           {QR({text: talerWithdrawUri})}
           <p>Click <a href={talerWithdrawUri}>{i18n`this link`}</a> to open 
your Taler wallet!</p>
-          <br /><br />
-          <button onClick={() => {
+          <br />
+          <a class="pure-button" onClick={() => {
             pageStateSetter((prevState: PageStateType) => {
               const { withdrawalOutcome, withdrawalId, talerWithdrawUri, 
...rest } = prevState;
               return { ...rest, withdrawalInProgress: false };
-          })}}>{i18n`Close`}</button>
+          })}}>{i18n`Abort`}</a>
         </section>);
       }
       default: {
@@ -911,6 +911,7 @@ function TalerWithdrawalQRCode(Props: any): VNode {
   }
   // here the reserve public key and exchange payment details are known to the 
bank,
   // ask for a confirmation (used to be the CAPTCHA page):
+  console.log("withdraw details arrived at the bank!");
   return (<Fragment>
     <h1 class="nav">{i18n`Confirm Withdrawal`}</h1>
     <p><Translate>
@@ -1063,7 +1064,7 @@ function LoginForm(Props: any): VNode {
  */
 function RegistrationForm(Props: any): VNode {
   const [pageState, pageStateSetter] = useContext(PageContext);
-  var submitData: CredentialsRequestType;
+  var submitData: CredentialsRequestType = {};
   const i18n = useTranslator();
 
   return (
@@ -1103,8 +1104,10 @@ function RegistrationForm(Props: any): VNode {
                 class="pure-button pure-button-primary"
                 onClick={() => {
                  console.log("maybe submitting the registration..");
-                 if (!("password" in submitData) || !("username" in 
submitData)) return;
-                 if (submitData.password.length === 0 || 
submitData.username.length === 0) return;
+                 if ((typeof submitData.password === "undefined") ||
+                     (typeof submitData.username === "undefined")) return;
+                 if (submitData.password.length === 0 ||
+                   submitData.username.length === 0) return;
                  console.log("submitting the registration..");
                   registrationCall(
                     submitData,
@@ -1214,7 +1217,7 @@ function Account(Props: any): VNode {
             tryManualTransfer: false,
           };
         });
-      }}>[{i18n`Logout`}]</a>);
+      }}>{i18n`Logout`}</a>);
 
   /**
    * This part shows a list of transactions: with 5 elements by

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]