gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (e9bdf7f31 -> 4f726b73e)


From: gnunet
Subject: [taler-wallet-core] branch master updated (e9bdf7f31 -> 4f726b73e)
Date: Thu, 01 Jun 2023 19:26:36 +0200

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

sebasjm pushed a change to branch master
in repository wallet-core.

    from e9bdf7f31 assets should have base directory to copy tree
     new 699a7b453 new asset api
     new 4f726b73e tx state ui

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/anastasis-webui/build.mjs                 |   2 +-
 packages/anastasis-webui/dev.mjs                   |   2 +-
 packages/anastasis-webui/test.mjs                  |   4 +-
 packages/demobank-ui/build.mjs                     |   2 +-
 packages/demobank-ui/dev.mjs                       |   2 +-
 packages/demobank-ui/test.mjs                      |   5 +-
 packages/exchange-backoffice-ui/build.mjs          |   2 +-
 packages/exchange-backoffice-ui/dev.mjs            |   2 +-
 packages/exchange-backoffice-ui/test.mjs           |   4 +-
 packages/merchant-backoffice-ui/build.mjs          |   2 +-
 packages/merchant-backoffice-ui/dev.mjs            |   2 +-
 packages/merchant-backoffice-ui/test.mjs           |   4 +-
 .../{TransactionItem.tsx => HistoryItem.tsx}       | 124 ++++++++++++++-------
 .../taler-wallet-webextension/src/spa/index.html   |  15 +--
 .../src/spa/manifest.json                          |  24 ++--
 .../{ => src/spa}/static/img/taler-alert-128.png   | Bin
 .../{ => src/spa}/static/img/taler-alert-48.png    | Bin
 .../{ => src/spa}/static/img/taler-logo-128.png    | Bin
 .../{ => src/spa}/static/img/taler-logo-2022.svg   |   0
 .../{ => src/spa}/static/img/taler-logo-48.png     | Bin
 .../src/wallet/History.stories.tsx                 |  96 +++++++++++++++-
 .../src/wallet/History.tsx                         |   4 +-
 .../src/wallet/Transaction.tsx                     |  14 ++-
 23 files changed, 225 insertions(+), 85 deletions(-)
 rename packages/taler-wallet-webextension/src/components/{TransactionItem.tsx 
=> HistoryItem.tsx} (78%)
 copy packages/taler-wallet-webextension/{ => 
src/spa}/static/img/taler-alert-128.png (100%)
 copy packages/taler-wallet-webextension/{ => 
src/spa}/static/img/taler-alert-48.png (100%)
 copy packages/taler-wallet-webextension/{ => 
src/spa}/static/img/taler-logo-128.png (100%)
 copy packages/taler-wallet-webextension/{ => 
src/spa}/static/img/taler-logo-2022.svg (100%)
 copy packages/taler-wallet-webextension/{ => 
src/spa}/static/img/taler-logo-48.png (100%)

diff --git a/packages/anastasis-webui/build.mjs 
b/packages/anastasis-webui/build.mjs
index 3a6234901..c52d5e718 100755
--- a/packages/anastasis-webui/build.mjs
+++ b/packages/anastasis-webui/build.mjs
@@ -20,7 +20,7 @@ await build({
   type: "production",
   source: {
     js: ["src/index.ts"],
-    assets: ["src/index.html"],
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   destination: "./dist/prod",
   css: "sass",
diff --git a/packages/anastasis-webui/dev.mjs b/packages/anastasis-webui/dev.mjs
index c7fa7b611..91fcc6a07 100755
--- a/packages/anastasis-webui/dev.mjs
+++ b/packages/anastasis-webui/dev.mjs
@@ -24,7 +24,7 @@ const build = initializeDev({
   type: "development",
   source: {
     js: devEntryPoints,
-    assets: ["src/index.html"],
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   css: "sass",
   destination: "./dist/dev",
diff --git a/packages/anastasis-webui/test.mjs 
b/packages/anastasis-webui/test.mjs
index 7a517fd5f..ba3257de8 100755
--- a/packages/anastasis-webui/test.mjs
+++ b/packages/anastasis-webui/test.mjs
@@ -22,8 +22,8 @@ const allTestFiles = getFilesInDirectory("src", 
/.test.tsx?$/);
 await build({
   type: "test",
   source: {
-    js: allTestFiles,
-    assets: ["src/index.html"],
+    js: allTestFiles.files,
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   destination: "./dist/prod",
   css: "sass",
diff --git a/packages/demobank-ui/build.mjs b/packages/demobank-ui/build.mjs
index f401e8620..22b91803a 100755
--- a/packages/demobank-ui/build.mjs
+++ b/packages/demobank-ui/build.mjs
@@ -21,7 +21,7 @@ await build({
   type: "production",
   source: {
     js: ["src/index.tsx"],
-    assets: ["src/index.html"],
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   destination: "./dist/prod",
   css: "sass",
diff --git a/packages/demobank-ui/dev.mjs b/packages/demobank-ui/dev.mjs
index 55223eadf..8b870451b 100755
--- a/packages/demobank-ui/dev.mjs
+++ b/packages/demobank-ui/dev.mjs
@@ -24,7 +24,7 @@ const build = initializeDev({
   type: "development",
   source: {
     js: devEntryPoints,
-    assets: ["src/index.html"],
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   destination: "./dist/dev",
   public: "/app",
diff --git a/packages/demobank-ui/test.mjs b/packages/demobank-ui/test.mjs
index 0cba3b292..9ff6055c6 100755
--- a/packages/demobank-ui/test.mjs
+++ b/packages/demobank-ui/test.mjs
@@ -23,8 +23,9 @@ const allTestFiles = getFilesInDirectory("src", 
/.test.tsx?$/);
 await build({
   type: "test",
   source: {
-    js: allTestFiles,
-    assets: ["src/index.html"],
+    js: allTestFiles.files,
+    assets: [{base:"src",files:["src/index.html"]}],
+   
   },
   destination: "./dist/test",
   css: "sass",
diff --git a/packages/exchange-backoffice-ui/build.mjs 
b/packages/exchange-backoffice-ui/build.mjs
index fd50c63c3..ae38c193d 100755
--- a/packages/exchange-backoffice-ui/build.mjs
+++ b/packages/exchange-backoffice-ui/build.mjs
@@ -21,7 +21,7 @@ await build({
   type: "production",
   source: {
     js: ["src/index.tsx"],
-    assets: ["src/index.html"],
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   destination: "./dist/prod",
   css: "postcss",
diff --git a/packages/exchange-backoffice-ui/dev.mjs 
b/packages/exchange-backoffice-ui/dev.mjs
index 825bbdbdf..c8996b894 100755
--- a/packages/exchange-backoffice-ui/dev.mjs
+++ b/packages/exchange-backoffice-ui/dev.mjs
@@ -24,7 +24,7 @@ const build = initializeDev({
   type: "development",
   source: {
     js: devEntryPoints,
-    assets: ["src/index.html"],
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   destination: "./dist/dev",
   css: "postcss",
diff --git a/packages/exchange-backoffice-ui/test.mjs 
b/packages/exchange-backoffice-ui/test.mjs
index 94c14050f..9df844fce 100755
--- a/packages/exchange-backoffice-ui/test.mjs
+++ b/packages/exchange-backoffice-ui/test.mjs
@@ -23,8 +23,8 @@ const allTestFiles = getFilesInDirectory("./src", 
/.test.tsx?$/);
 await build({
   type: "test",
   source: {
-    js: allTestFiles,
-    assets: ["src/index.html"],
+    js: allTestFiles.files,
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   destination: "./dist/test",
   css: "postcss",
diff --git a/packages/merchant-backoffice-ui/build.mjs 
b/packages/merchant-backoffice-ui/build.mjs
index 24bdef3b5..b6d6e5127 100755
--- a/packages/merchant-backoffice-ui/build.mjs
+++ b/packages/merchant-backoffice-ui/build.mjs
@@ -21,7 +21,7 @@ await build({
   type: "production",
   source: {
     js: ["src/index.tsx"],
-    assets: ["src/index.html"],
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   destination: "./dist/prod",
   css: "sass",
diff --git a/packages/merchant-backoffice-ui/dev.mjs 
b/packages/merchant-backoffice-ui/dev.mjs
index 2c0ec99f7..6cc99add0 100755
--- a/packages/merchant-backoffice-ui/dev.mjs
+++ b/packages/merchant-backoffice-ui/dev.mjs
@@ -24,7 +24,7 @@ const build = initializeDev({
   type: "development",
   source: {
     js: devEntryPoints,
-    assets: ["src/index.html"],
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   css: "sass",
   destination: "./dist/dev",
diff --git a/packages/merchant-backoffice-ui/test.mjs 
b/packages/merchant-backoffice-ui/test.mjs
index 5649a4db6..be76348e5 100755
--- a/packages/merchant-backoffice-ui/test.mjs
+++ b/packages/merchant-backoffice-ui/test.mjs
@@ -23,8 +23,8 @@ const allTestFiles = getFilesInDirectory("src", 
/.test.tsx?$/);
 await build({
   type: "test",
   source: {
-    js: allTestFiles,
-    assets: ["src/index.html"],
+    js: allTestFiles.files,
+    assets: [{base:"src",files:["src/index.html"]}],
   },
   destination: "./dist/test",
   css: "sass",
diff --git 
a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx 
b/packages/taler-wallet-webextension/src/components/HistoryItem.tsx
similarity index 78%
rename from 
packages/taler-wallet-webextension/src/components/TransactionItem.tsx
rename to packages/taler-wallet-webextension/src/components/HistoryItem.tsx
index 15669e63d..a0ce04460 100644
--- a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
+++ b/packages/taler-wallet-webextension/src/components/HistoryItem.tsx
@@ -39,7 +39,7 @@ import {
 } from "./styled/index.js";
 import { Time } from "./Time.js";
 
-export function TransactionItem(props: { tx: Transaction }): VNode {
+export function HistoryItem(props: { tx: Transaction }): VNode {
   const tx = props.tx;
   const { i18n } = useTranslationContext();
   /**
@@ -48,14 +48,15 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
   switch (tx.type) {
     case TransactionType.Withdrawal:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"credit"}
           title={new URL(tx.exchangeBaseUrl).hostname}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"W"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? tx.withdrawalDetails.type ===
                 WithdrawalType.TalerBankIntegrationApi
@@ -71,14 +72,15 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
       );
     case TransactionType.InternalWithdrawal:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"credit"}
           title={new URL(tx.exchangeBaseUrl).hostname}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"I"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? tx.withdrawalDetails.type ===
                 WithdrawalType.TalerBankIntegrationApi
@@ -94,7 +96,7 @@ export function TransactionItem(props: { tx: Transaction }): 
VNode {
       );
     case TransactionType.Payment:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"debit"}
@@ -102,7 +104,8 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
           subtitle={tx.info.summary}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"P"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Payment in progress`
               : undefined
@@ -111,7 +114,7 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
       );
     case TransactionType.Refund:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"credit"}
@@ -123,7 +126,8 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
           } //FIXME: DD37 wallet-core is not returning this value
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"R"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Executing refund...`
               : undefined
@@ -132,14 +136,15 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
       );
     case TransactionType.Tip:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"credit"}
           title={new URL(tx.merchantBaseUrl).hostname}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"T"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Grabbing the tipping...`
               : undefined
@@ -148,14 +153,15 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
       );
     case TransactionType.Refresh:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"credit"}
           title={"Refresh"}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"R"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Refreshing coins...`
               : undefined
@@ -164,14 +170,15 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
       );
     case TransactionType.Deposit:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"debit"}
           title={tx.targetPaytoUri}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"D"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Deposit in progress`
               : undefined
@@ -180,14 +187,15 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
       );
     case TransactionType.PeerPullCredit:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"credit"}
           title={tx.info.summary || "Invoice"}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"I"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Waiting to be paid`
               : undefined
@@ -196,14 +204,15 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
       );
     case TransactionType.PeerPullDebit:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"debit"}
           title={tx.info.summary || "Invoice"}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"I"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Payment in progress`
               : undefined
@@ -212,14 +221,15 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
       );
     case TransactionType.PeerPushCredit:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"credit"}
           title={tx.info.summary || "Transfer"}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"T"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Receiving the transfer`
               : undefined
@@ -228,14 +238,15 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
       );
     case TransactionType.PeerPushDebit:
       return (
-        <TransactionLayout
+        <Layout
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"debit"}
           title={tx.info.summary || "Transfer"}
           timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)}
           iconPath={"T"}
-          pending={
+          currentState={tx.txState.major}
+          description={
             tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Waiting to be received`
               : undefined
@@ -248,13 +259,22 @@ export function TransactionItem(props: { tx: Transaction 
}): VNode {
   }
 }
 
-function TransactionLayout(props: TransactionLayoutProps): VNode {
+function Layout(props: LayoutProps): VNode {
   const { i18n } = useTranslationContext();
   return (
     <HistoryRow
       href={Pages.balanceTransaction({ tid: props.id })}
       style={{
-        backgroundColor: props.pending ? "lightcyan" : "inherit",
+        backgroundColor:
+          props.currentState === TransactionMajorState.Pending ||
+          props.currentState === TransactionMajorState.Dialog
+            ? "lightcyan"
+            : props.currentState === TransactionMajorState.Failed
+            ? "#ff000040"
+            : props.currentState === TransactionMajorState.Aborted ||
+              props.currentState === TransactionMajorState.Aborting
+            ? "#00000010"
+            : "inherit",
         alignItems: "center",
       }}
     >
@@ -276,9 +296,9 @@ function TransactionLayout(props: TransactionLayoutProps): 
VNode {
             </div>
           )}
         </LargeText>
-        {props.pending && (
+        {props.description && (
           <LightText style={{ marginTop: 5, marginBottom: 5 }}>
-            <i18n.Translate>{props.pending}</i18n.Translate>
+            <i18n.Translate>{props.description}</i18n.Translate>
           </LightText>
         )}
         <SmallLightText style={{ marginTop: 5 }}>
@@ -286,7 +306,7 @@ function TransactionLayout(props: TransactionLayoutProps): 
VNode {
         </SmallLightText>
       </Column>
       <TransactionAmount
-        pending={props.pending !== undefined}
+        currentState={props.currentState}
         amount={Amounts.parseOrThrow(props.amount)}
         debitCreditIndicator={props.debitCreditIndicator}
       />
@@ -294,7 +314,7 @@ function TransactionLayout(props: TransactionLayoutProps): 
VNode {
   );
 }
 
-interface TransactionLayoutProps {
+interface LayoutProps {
   debitCreditIndicator: "debit" | "credit" | "unknown";
   amount: AmountString | "unknown";
   timestamp: AbsoluteTime;
@@ -302,13 +322,14 @@ interface TransactionLayoutProps {
   subtitle?: string;
   id: string;
   iconPath: string;
-  pending?: string;
+  currentState: TransactionMajorState;
+  description?: string;
 }
 
 interface TransactionAmountProps {
   debitCreditIndicator: "debit" | "credit" | "unknown";
   amount: AmountJson;
-  pending: boolean;
+  currentState: TransactionMajorState;
 }
 
 function TransactionAmount(props: TransactionAmountProps): VNode {
@@ -328,24 +349,43 @@ function TransactionAmount(props: 
TransactionAmountProps): VNode {
     <Column
       style={{
         textAlign: "center",
-        color: props.pending
-          ? "gray"
-          : sign === "+"
-          ? "darkgreen"
-          : sign === "-"
-          ? "darkred"
-          : undefined,
+        color:
+          props.currentState !== TransactionMajorState.Done
+            ? "gray"
+            : sign === "+"
+            ? "darkgreen"
+            : sign === "-"
+            ? "darkred"
+            : undefined,
       }}
     >
       <ExtraLargeText>
         {sign}
         {Amounts.stringifyValue(props.amount, 2)}
       </ExtraLargeText>
-      {props.pending && (
-        <div>
-          <i18n.Translate>PENDING</i18n.Translate>
+      {props.currentState === TransactionMajorState.Aborted ? (
+        <div
+          style={{
+            color: "black",
+            border: "1px black solid",
+            borderRadius: 8,
+            padding: 4,
+          }}
+        >
+          <i18n.Translate>ABORTED</i18n.Translate>
         </div>
-      )}
+      ) : props.currentState === TransactionMajorState.Failed ? (
+        <div
+          style={{
+            color: "red",
+            border: "1px darkred solid",
+            borderRadius: 8,
+            padding: 4,
+          }}
+        >
+          <i18n.Translate>FAILED</i18n.Translate>
+        </div>
+      ) : undefined}
     </Column>
   );
 }
diff --git a/packages/taler-wallet-webextension/src/spa/index.html 
b/packages/taler-wallet-webextension/src/spa/index.html
index f352c7bf4..0d2cf0e0b 100644
--- a/packages/taler-wallet-webextension/src/spa/index.html
+++ b/packages/taler-wallet-webextension/src/spa/index.html
@@ -1,7 +1,7 @@
 <html>
   <head>
     <meta charset="utf-8" />
-    <link rel="manifest" href="manifest.json" />
+    <link rel="manifest" href="./manifest.json" />
     <style>
       .overlay {
         position: absolute;
@@ -54,8 +54,9 @@ justify-content: center;
       width="1000"
       height="100%"
     >
-    <input id="page-url" type="text" />
-    <button onclick="openPage()">open</button>
+     </iframe>
+    <!-- <input id="page-url" type="text" />
+    <button onclick="openPage()">open</button> -->
     <!-- <a
       href='javascript:void(window.frames["other"].location = 
"http://bank.taler:5882";)'
       >open local bank</a
@@ -77,17 +78,13 @@ justify-content: center;
       src="about:blank"
       width="500"
       height="325"
-    >
-  </iframe>
+      >
+      </iframe>
     </div>
-    <hr />
-    </iframe>
     <!-- <hr />
     <iframe src="tests.html" name="wallet" width="800" height="100%"> 
</iframe> -->
     <!-- <hr />
     <iframe src="stories.html" name="wallet" width="800" height="100%"> -->
-    </iframe>
-    <hr />
     <script type="module" src="background.dev.js"></script>
   </body>
 </html>
diff --git a/packages/taler-wallet-webextension/src/spa/manifest.json 
b/packages/taler-wallet-webextension/src/spa/manifest.json
index d871bf7e8..49b7f05e2 100644
--- a/packages/taler-wallet-webextension/src/spa/manifest.json
+++ b/packages/taler-wallet-webextension/src/spa/manifest.json
@@ -3,18 +3,17 @@
   "description": "Privacy preserving and transparent payments",
   "author": "GNU Taler Developers",
   "version": "0.9.3.13",
+  "id": "gnu-taler-wallet-web-spa-development",
   "version_name": "0.9.3-dev.13",
-  "icons": {
-    "16": "static/img/taler-logo-16.png",
-    "19": "static/img/taler-logo-19.png",
-    "32": "static/img/taler-logo-32.png",
-    "38": "static/img/taler-logo-38.png",
-    "48": "static/img/taler-logo-48.png",
-    "64": "static/img/taler-logo-64.png",
-    "128": "static/img/taler-logo-128.png",
-    "256": "static/img/taler-logo-256.png",
-    "512": "static/img/taler-logo-512.png"
-  },
+  "icons": [{
+    "src": "static/img/taler-logo-48.png",
+    "sizes": "48x48"
+  },{
+    "src": "static/img/taler-logo-128.png",
+    "sizes": "128x128"
+  }],
+  "display": "minimal-ui",
+  "start_url": "http://localhost:8080/app/index.html";,
   "manifest_version": 3,
   "minimum_chrome_version": "88",
   "permissions": [
@@ -75,8 +74,5 @@
     },
     "default_title": "GNU Taler Wallet",
     "default_popup": "static/popup.html"
-  },
-  "background": {
-    "service_worker": "service_worker.js"
   }
 }
diff --git a/packages/taler-wallet-webextension/static/img/taler-alert-128.png 
b/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-128.png
similarity index 100%
copy from packages/taler-wallet-webextension/static/img/taler-alert-128.png
copy to 
packages/taler-wallet-webextension/src/spa/static/img/taler-alert-128.png
diff --git a/packages/taler-wallet-webextension/static/img/taler-alert-48.png 
b/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-48.png
similarity index 100%
copy from packages/taler-wallet-webextension/static/img/taler-alert-48.png
copy to packages/taler-wallet-webextension/src/spa/static/img/taler-alert-48.png
diff --git a/packages/taler-wallet-webextension/static/img/taler-logo-128.png 
b/packages/taler-wallet-webextension/src/spa/static/img/taler-logo-128.png
similarity index 100%
copy from packages/taler-wallet-webextension/static/img/taler-logo-128.png
copy to packages/taler-wallet-webextension/src/spa/static/img/taler-logo-128.png
diff --git a/packages/taler-wallet-webextension/static/img/taler-logo-2022.svg 
b/packages/taler-wallet-webextension/src/spa/static/img/taler-logo-2022.svg
similarity index 100%
copy from packages/taler-wallet-webextension/static/img/taler-logo-2022.svg
copy to 
packages/taler-wallet-webextension/src/spa/static/img/taler-logo-2022.svg
diff --git a/packages/taler-wallet-webextension/static/img/taler-logo-48.png 
b/packages/taler-wallet-webextension/src/spa/static/img/taler-logo-48.png
similarity index 100%
copy from packages/taler-wallet-webextension/static/img/taler-logo-48.png
copy to packages/taler-wallet-webextension/src/spa/static/img/taler-logo-48.png
diff --git a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx 
b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx
index b9c408fe1..149c8c1f4 100644
--- a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx
@@ -43,7 +43,7 @@ import { HistoryView as TestedComponent } from "./History.js";
 import * as tests from "@gnu-taler/web-util/testing";
 
 export default {
-  title: "balance",
+  title: "history",
   component: TestedComponent,
 };
 
@@ -291,6 +291,100 @@ export const SomeTransactions = 
tests.createExample(TestedComponent, {
   ],
 });
 
+export const SomeTransactionsInDifferentStates = tests.createExample(
+  TestedComponent,
+  {
+    transactions: [
+      exampleData.withdraw,
+      {
+        ...exampleData.withdraw,
+        exchangeBaseUrl: "https://aborted/withdrawal";,
+        txState: {
+          major: TransactionMajorState.Aborted,
+        },
+      },
+      {
+        ...exampleData.withdraw,
+        exchangeBaseUrl: "https://pending/withdrawal";,
+        txState: {
+          major: TransactionMajorState.Pending,
+        },
+      },
+      {
+        ...exampleData.withdraw,
+        exchangeBaseUrl: "https://failed/withdrawal";,
+        txState: {
+          major: TransactionMajorState.Failed,
+        },
+      },
+      {
+        ...exampleData.payment,
+        info: {
+          ...exampleData.payment.info,
+          summary: "normal payment",
+        },
+      },
+      {
+        ...exampleData.payment,
+        info: {
+          ...exampleData.payment.info,
+          summary: "aborting in progress",
+        },
+        txState: {
+          major: TransactionMajorState.Aborting,
+        },
+      },
+      {
+        ...exampleData.payment,
+        info: {
+          ...exampleData.payment.info,
+          summary: "aborted payment",
+        },
+        txState: {
+          major: TransactionMajorState.Aborted,
+        },
+      },
+      {
+        ...exampleData.payment,
+        info: {
+          ...exampleData.payment.info,
+          summary: "pending payment",
+        },
+        txState: {
+          major: TransactionMajorState.Pending,
+        },
+      },
+      {
+        ...exampleData.payment,
+        info: {
+          ...exampleData.payment.info,
+          summary: "failed payment",
+        },
+        txState: {
+          major: TransactionMajorState.Failed,
+        },
+      },
+      exampleData.refund,
+      exampleData.tip,
+      exampleData.deposit,
+    ],
+    balances: [
+      {
+        available: "USD:10",
+        pendingIncoming: "USD:0",
+        pendingOutgoing: "USD:0",
+        hasPendingTransactions: false,
+        requiresUserInput: false,
+        scopeInfo: {
+          currency: "Ásd",
+          type: ScopeType.Auditor,
+          url: "",
+        },
+      },
+    ],
+  },
+);
+
 export const SomeTransactionsWithTwoCurrencies = tests.createExample(
   TestedComponent,
   {
diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx 
b/packages/taler-wallet-webextension/src/wallet/History.tsx
index 34eb9be8c..31c092697 100644
--- a/packages/taler-wallet-webextension/src/wallet/History.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/History.tsx
@@ -33,7 +33,7 @@ import {
   NiceSelect,
 } from "../components/styled/index.js";
 import { Time } from "../components/Time.js";
-import { TransactionItem } from "../components/TransactionItem.js";
+import { HistoryItem } from "../components/HistoryItem.js";
 import { alertFromError, useAlertContext } from "../context/alert.js";
 import { useBackendContext } from "../context/backend.js";
 import { useTranslationContext } from "@gnu-taler/web-util/browser";
@@ -269,7 +269,7 @@ export function HistoryView({
                   />
                 </DateSeparator>
                 {byDate[d].map((tx, i) => (
-                  <TransactionItem key={i} tx={tx} />
+                  <HistoryItem key={i} tx={tx} />
                 ))}
               </Fragment>
             );
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx 
b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index eb2325e7a..7b4cf964f 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -52,6 +52,7 @@ import { QR } from "../components/QR.js";
 import { ShowFullContractTermPopup } from 
"../components/ShowFullContractTermPopup.js";
 import {
   CenteredDialog,
+  ErrorBox,
   InfoBox,
   ListOfProducts,
   Overlay,
@@ -128,7 +129,7 @@ export function TransactionPage({ tid, goToWalletHistory }: 
Props): VNode {
         goToWalletHistory(currency);
       }}
       onResume={async () => {
-        await api.wallet.call(WalletApiOperation.SuspendTransaction, {
+        await api.wallet.call(WalletApiOperation.ResumeTransaction, {
           transactionId,
         });
         goToWalletHistory(currency);
@@ -239,6 +240,7 @@ function TransactionTemplate({
     transaction.txState.major === TransactionMajorState.Aborting;
 
   const showRetry =
+    !isFinalState &&
     transaction.txState.major !== TransactionMajorState.Pending &&
     transaction.txState.major !== TransactionMajorState.Aborting;
 
@@ -289,6 +291,16 @@ function TransactionTemplate({
             <i18n.Translate>This transaction is not completed</i18n.Translate>
           </WarningBox>
         )}
+        {transaction.txState.major === TransactionMajorState.Aborted && (
+          <InfoBox>
+            <i18n.Translate>This transaction was aborted</i18n.Translate>
+          </InfoBox>
+        )}
+        {transaction.txState.major === TransactionMajorState.Failed && (
+          <ErrorBox>
+            <i18n.Translate>This transaction failed</i18n.Translate>
+          </ErrorBox>
+        )}
         {confirmBeforeForget ? (
           <Overlay>
             <CenteredDialog>

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