[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated (1653130de -> 59ef010b0)
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated (1653130de -> 59ef010b0) |
Date: |
Thu, 14 Sep 2023 18:10:29 +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 1653130de update how access token management is handled
new b7afefb71 do, instead of show a message
new 59ef010b0 update testing
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:
contrib/copy-backend-into-prebuilt.sh | 2 +-
contrib/copy-backoffice-into-prebuilt.sh | 2 +-
contrib/copy-demobank-into-prebuilt.sh | 2 +-
.../merchant-backoffice-ui/src/context/backend.test.ts | 4 ++--
.../merchant-backoffice-ui/src/hooks/instance.test.ts | 4 ++--
.../src/paths/instance/update/UpdatePage.tsx | 4 ----
.../src/paths/instance/update/index.tsx | 17 ++++-------------
7 files changed, 11 insertions(+), 24 deletions(-)
diff --git a/contrib/copy-backend-into-prebuilt.sh
b/contrib/copy-backend-into-prebuilt.sh
index b9fa2a68e..383871ac6 100755
--- a/contrib/copy-backend-into-prebuilt.sh
+++ b/contrib/copy-backend-into-prebuilt.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-[ ! -d prebuilt ] && echo 'directory "prebuilt" not found. first checkout the
prebuilt branch into a prebuilt directory' && exit 1
+[ ! -d prebuilt ] && git worktree add -f prebuilt prebuilt && exit 1
for file in depleted_tip.en.html offer_refund.en.html offer_tip.en.html
request_payment.en.html show_order_details.en.html; do
cp packages/merchant-backend-ui/dist/pages/$file prebuilt/backend/
diff --git a/contrib/copy-backoffice-into-prebuilt.sh
b/contrib/copy-backoffice-into-prebuilt.sh
index aecebf01b..d21b91096 100755
--- a/contrib/copy-backoffice-into-prebuilt.sh
+++ b/contrib/copy-backoffice-into-prebuilt.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-[ ! -d prebuilt ] && echo 'directory "prebuilt" not found. first checkout the
prebuilt branch into a prebuilt directory' && exit 1
+[ ! -d prebuilt ] && git worktree add -f prebuilt prebuilt && exit 1
find packages/merchant-backoffice-ui/dist/prod/ -type f -printf '%P\n' | sort
> prebuilt/backoffice/bof
diff --git a/contrib/copy-demobank-into-prebuilt.sh
b/contrib/copy-demobank-into-prebuilt.sh
index f5292a767..755b66150 100755
--- a/contrib/copy-demobank-into-prebuilt.sh
+++ b/contrib/copy-demobank-into-prebuilt.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-[ ! -d prebuilt ] && echo 'directory "prebuilt" not found. first checkout the
prebuilt branch into a prebuilt directory' && exit 1
+[ ! -d prebuilt ] && git worktree add -f prebuilt prebuilt && exit 1
find packages/demobank-ui/dist/prod/ -type f -printf '%P\n' | sort >
prebuilt/demobank/bof
diff --git a/packages/merchant-backoffice-ui/src/context/backend.test.ts
b/packages/merchant-backoffice-ui/src/context/backend.test.ts
index b042d5a25..ad6393e29 100644
--- a/packages/merchant-backoffice-ui/src/context/backend.test.ts
+++ b/packages/merchant-backoffice-ui/src/context/backend.test.ts
@@ -64,7 +64,7 @@ describe("backend context api ", () => {
} as MerchantBackend.Instances.QueryInstancesResponse,
});
- management.setNewToken("another_token" as AccessToken);
+ management.setNewAccessToken(undefined,"another_token" as
AccessToken);
},
({ instance, management, admin }) => {
expect(env.assertJustExpectedRequestWereMade()).deep.eq({
@@ -113,7 +113,7 @@ describe("backend context api ", () => {
name: "instance_name",
} as MerchantBackend.Instances.QueryInstancesResponse,
});
- instance.setNewToken("another_token" as AccessToken);
+ instance.setNewAccessToken(undefined, "another_token" as
AccessToken);
},
({ instance, management, admin }) => {
expect(env.assertJustExpectedRequestWereMade()).deep.eq({
diff --git a/packages/merchant-backoffice-ui/src/hooks/instance.test.ts
b/packages/merchant-backoffice-ui/src/hooks/instance.test.ts
index a7b8d047c..0c0c44590 100644
--- a/packages/merchant-backoffice-ui/src/hooks/instance.test.ts
+++ b/packages/merchant-backoffice-ui/src/hooks/instance.test.ts
@@ -158,7 +158,7 @@ describe("instance api interaction with details", () => {
},
} as MerchantBackend.Instances.QueryInstancesResponse,
});
- api.setNewToken("secret" as AccessToken);
+ api.setNewAccessToken(undefined, "secret" as AccessToken);
},
({ query, api }) => {
expect(env.assertJustExpectedRequestWereMade()).deep.eq({
@@ -234,7 +234,7 @@ describe("instance api interaction with details", () => {
} as MerchantBackend.Instances.QueryInstancesResponse,
});
- api.clearToken();
+ api.clearAccessToken(undefined);
},
({ query, api }) => {
expect(env.assertJustExpectedRequestWereMade()).deep.eq({
diff --git
a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx
b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx
index a1c608f15..01a3d0252 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx
@@ -39,9 +39,6 @@ type Entity =
MerchantBackend.Instances.InstanceReconfigurationMessage & {
//MerchantBackend.Instances.InstanceAuthConfigurationMessage
interface Props {
onUpdate: (d: Entity) => void;
- onChangeAuth: (
- d: MerchantBackend.Instances.InstanceAuthConfigurationMessage,
- ) => Promise<void>;
selected: MerchantBackend.Instances.QueryInstancesResponse;
isLoading: boolean;
onBack: () => void;
@@ -78,7 +75,6 @@ function getTokenValuePart(t?: string): string | undefined {
export function UpdatePage({
onUpdate,
- onChangeAuth,
selected,
onBack,
}: Props): VNode {
diff --git
a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
index 6c5e7a514..e44cf5c0f 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
@@ -46,17 +46,17 @@ export interface Props {
}
export default function Update(props: Props): VNode {
- const { updateInstance, clearToken, setNewToken } = useInstanceAPI();
+ const { updateInstance } = useInstanceAPI();
const result = useInstanceDetails();
- return CommonUpdate(props, result, updateInstance, clearToken, setNewToken);
+ return CommonUpdate(props, result, updateInstance, );
}
export function AdminUpdate(props: Props & { instanceId: string }): VNode {
- const { updateInstance, clearToken, setNewToken } = useManagementAPI(
+ const { updateInstance } = useManagementAPI(
props.instanceId,
);
const result = useManagedInstanceDetails(props.instanceId);
- return CommonUpdate(props, result, updateInstance, clearToken, setNewToken);
+ return CommonUpdate(props, result, updateInstance, );
}
function CommonUpdate(
@@ -73,8 +73,6 @@ function CommonUpdate(
MerchantBackend.ErrorDetail
>,
updateInstance: any,
- clearToken: () => Promise<void>,
- setNewToken: (t: AccessToken) => Promise<void>,
): VNode {
const [notif, setNotif] = useState<Notification | undefined>(undefined);
const { i18n } = useTranslationContext();
@@ -114,13 +112,6 @@ function CommonUpdate(
}),
);
}}
- onChangeAuth={(
- d: MerchantBackend.Instances.InstanceAuthConfigurationMessage,
- ): Promise<void> => {
- const apiCall =
- d.method === "external" ? clearToken() : setNewToken(d.token! as
AccessToken);
- return apiCall.then(onConfirm).catch(onUpdateError);
- }}
/>
</Fragment>
);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] branch master updated (1653130de -> 59ef010b0),
gnunet <=