gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant-backoffice] branch master updated (82b3e74 -> 264b148)


From: gnunet
Subject: [taler-merchant-backoffice] branch master updated (82b3e74 -> 264b148)
Date: Sun, 23 Oct 2022 18:11:14 +0200

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

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

    from 82b3e74  fix: 🐛 Fix logout->re-login typerror
     new 73235c4  testing
     new 264b148  avoid action-less form

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/bank/README.md                               | 16 +++++++++++++++-
 packages/bank/mocks/{window.js => demo-window.js}     |  5 +++--
 packages/bank/package.json                            |  3 ++-
 packages/bank/{preact.mock.js => preact.mock.demo.js} |  2 +-
 packages/bank/src/pages/home/index.tsx                |  3 ++-
 5 files changed, 23 insertions(+), 6 deletions(-)
 copy packages/bank/mocks/{window.js => demo-window.js} (78%)
 copy packages/bank/{preact.mock.js => preact.mock.demo.js} (96%)

diff --git a/packages/bank/README.md b/packages/bank/README.md
index 73b2abb..233e4d7 100644
--- a/packages/bank/README.md
+++ b/packages/bank/README.md
@@ -1,5 +1,19 @@
 # bank web
 
+## Testing at bank.demo.taler.net
+
+the command "pnpm dev-demo" mocks the 'window' object
+to address any request to the backend at bank.demo.taler.net,
+and launches the development server (see mocks/demo-window.js).
+
+Point your browser at localhost:9090, in order to get the
+SPA automatically compiled and loaded.
+
+Note: even if login/register/withdraw operations do reach
+the backend, the 'window' object as shown in the javascript
+console relates however to "localhost:9090" (FIXME).
+
+
 ## CLI Commands
 
 - `npm install`: Installs dependencies
@@ -18,4 +32,4 @@
 
 For detailed explanation on how things work, checkout the [CLI 
Readme](https://github.com/developit/preact-cli/blob/master/README.md).
 
-It's worth noting that you may need to use Node.JS v12/14 on some builds of 
Node.JS as webpack attempts to make MD4 hashes, which are unsupported in some 
OpenSSL versions used by more modern NodeJS versions.
\ No newline at end of file
+It's worth noting that you may need to use Node.JS v12/14 on some builds of 
Node.JS as webpack attempts to make MD4 hashes, which are unsupported in some 
OpenSSL versions used by more modern NodeJS versions.
diff --git a/packages/bank/mocks/window.js b/packages/bank/mocks/demo-window.js
similarity index 78%
copy from packages/bank/mocks/window.js
copy to packages/bank/mocks/demo-window.js
index f396ff9..4400590 100644
--- a/packages/bank/mocks/window.js
+++ b/packages/bank/mocks/demo-window.js
@@ -18,9 +18,10 @@ Object.defineProperty(window, 'localStorage', {
 });
 Object.defineProperty(window, 'location', {
   value: {
-    origin: "http://localhost:8080";, /* where taler-local rev proxy listens to 
*/
+    origin: "https://bank.demo.taler.net";,
     search: "",
-    pathname: "/sandbox/demobanks/default",
+    pathname: "/demobanks/default",
+    href: "https://bank.demo.taler.net/demobanks/default";
   }
 })
 
diff --git a/packages/bank/package.json b/packages/bank/package.json
index cf59ff3..a44da5c 100644
--- a/packages/bank/package.json
+++ b/packages/bank/package.json
@@ -5,6 +5,7 @@
   "license": "AGPL-3.0-OR-LATER",
   "scripts": {
     "dev": "preact watch --port ${PORT:=9090} --no-sw --no-esm -c 
preact.mock.js",
+    "dev-demo": "preact watch --port ${PORT:=9090} --no-sw --no-esm -c 
preact.mock.demo.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}'",
@@ -122,4 +123,4 @@
       "<rootDir>/tests/__mocks__/setupTests.ts"
     ]
   }
-}
\ No newline at end of file
+}
diff --git a/packages/bank/preact.mock.js b/packages/bank/preact.mock.demo.js
similarity index 96%
copy from packages/bank/preact.mock.js
copy to packages/bank/preact.mock.demo.js
index dc3ceb6..e58ef1d 100644
--- a/packages/bank/preact.mock.js
+++ b/packages/bank/preact.mock.demo.js
@@ -45,7 +45,7 @@ export default {
         'process.env.__VERSION__': JSON.stringify(env.isProd ? pack.version : 
`dev-${commitHash}`) ,
       }),
       // 'window' gets mocked to point at a running euFin instance.
-      new ProvidePlugin({window: path.resolve("mocks/window")}),
+      new ProvidePlugin({window: path.resolve("mocks/demo-window")}),
       new DefinePlugin({"DEMO_SITES": JSON.stringify(DEMO_SITES)})
     );
 
diff --git a/packages/bank/src/pages/home/index.tsx 
b/packages/bank/src/pages/home/index.tsx
index 2d015ac..7352d10 100644
--- a/packages/bank/src/pages/home/index.tsx
+++ b/packages/bank/src/pages/home/index.tsx
@@ -542,6 +542,7 @@ async function confirmWithdrawalCall(
       
`access-api/accounts/${backendState.username}/withdrawals/${withdrawalId}/confirm`,
       backendState.url
     )
+    console.log("Confirming the withdrawal at", url.href);
     res = await fetch(url.href, {
       method: 'POST',
       headers
@@ -1133,7 +1134,7 @@ const TalerWithdrawalConfirmationQuestion = (Props: any): 
VNode => {
     <h1 class="nav">{i18n`Confirm Withdrawal`}</h1>
     <article>
       <div class="challenge-div">
-        <form class="challenge-form">
+        <form action="javascript:void(0);" class="challenge-form">
           <div class="pure-form"
             id="captcha"
             name="capcha-form">

-- 
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]