[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: remove allowed a
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: remove allowed auditors from contract terms |
Date: |
Fri, 05 May 2023 13:29:53 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new cbf0f8395 wallet-core: remove allowed auditors from contract terms
cbf0f8395 is described below
commit cbf0f839542f7eda88cdc2a5c7b602e690309154
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri May 5 13:29:49 2023 +0200
wallet-core: remove allowed auditors from contract terms
---
packages/taler-util/src/taler-types.ts | 6 ------
packages/taler-wallet-core/src/db.ts | 1 -
packages/taler-wallet-core/src/operations/deposits.ts | 6 ++----
packages/taler-wallet-core/src/operations/pay-merchant.ts | 10 +++-------
.../src/components/ShowFullContractTermPopup.stories.tsx | 6 ------
.../src/components/ShowFullContractTermPopup.tsx | 15 ---------------
6 files changed, 5 insertions(+), 39 deletions(-)
diff --git a/packages/taler-util/src/taler-types.ts
b/packages/taler-util/src/taler-types.ts
index 295530529..56184a598 100644
--- a/packages/taler-util/src/taler-types.ts
+++ b/packages/taler-util/src/taler-types.ts
@@ -448,11 +448,6 @@ export interface MerchantContractTerms {
*/
amount: string;
- /**
- * Auditors accepted by the merchant.
- */
- auditors: AuditorHandle[];
-
/**
* Deadline to pay for the contract.
*/
@@ -1321,7 +1316,6 @@ export const codecForMerchantContractTerms = ():
Codec<MerchantContractTerms> =>
.property("summary_i18n", codecOptional(codecForInternationalizedString()))
.property("nonce", codecForString())
.property("amount", codecForString())
- .property("auditors", codecForList(codecForAuditorHandle()))
.property("pay_deadline", codecForTimestamp)
.property("refund_deadline", codecForTimestamp)
.property("wire_transfer_deadline", codecForTimestamp)
diff --git a/packages/taler-wallet-core/src/db.ts
b/packages/taler-wallet-core/src/db.ts
index a95db9ca3..d1258f2f9 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -1120,7 +1120,6 @@ export interface WalletContractData {
wireFeeAmortization: number;
payDeadline: TalerProtocolTimestamp;
refundDeadline: TalerProtocolTimestamp;
- allowedAuditors: AllowedAuditorInfo[];
allowedExchanges: AllowedExchangeInfo[];
timestamp: TalerProtocolTimestamp;
wireMethod: string;
diff --git a/packages/taler-wallet-core/src/operations/deposits.ts
b/packages/taler-wallet-core/src/operations/deposits.ts
index b08f03bd1..c3d24cbf3 100644
--- a/packages/taler-wallet-core/src/operations/deposits.ts
+++ b/packages/taler-wallet-core/src/operations/deposits.ts
@@ -910,7 +910,6 @@ export async function prepareDepositGroup(
const now = AbsoluteTime.now();
const nowRounded = AbsoluteTime.toTimestamp(now);
const contractTerms: MerchantContractTerms = {
- auditors: [],
exchanges: exchangeInfos,
amount: req.amount,
max_fee: Amounts.stringify(amount),
@@ -944,7 +943,7 @@ export async function prepareDepositGroup(
);
const payCoinSel = await selectPayCoinsNew(ws, {
- auditors: contractData.allowedAuditors,
+ auditors: [],
exchanges: contractData.allowedExchanges,
wireMethod: contractData.wireMethod,
contractTermsAmount: Amounts.parseOrThrow(contractData.amount),
@@ -1029,7 +1028,6 @@ export async function createDepositGroup(
const wireSalt = encodeCrock(getRandomBytes(16));
const wireHash = hashWire(req.depositPaytoUri, wireSalt);
const contractTerms: MerchantContractTerms = {
- auditors: [],
exchanges: exchangeInfos,
amount: req.amount,
max_fee: Amounts.stringify(amount),
@@ -1063,7 +1061,7 @@ export async function createDepositGroup(
);
const payCoinSel = await selectPayCoinsNew(ws, {
- auditors: contractData.allowedAuditors,
+ auditors: [],
exchanges: contractData.allowedExchanges,
wireMethod: contractData.wireMethod,
contractTermsAmount: Amounts.parseOrThrow(contractData.amount),
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts
b/packages/taler-wallet-core/src/operations/pay-merchant.ts
index 67343d69a..6aad1d742 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -286,10 +286,6 @@ export function extractContractData(
payDeadline: parsedContractTerms.pay_deadline,
refundDeadline: parsedContractTerms.refund_deadline,
wireFeeAmortization: parsedContractTerms.wire_fee_amortization || 1,
- allowedAuditors: parsedContractTerms.auditors.map((x) => ({
- auditorBaseUrl: x.url,
- auditorPub: x.auditor_pub,
- })),
allowedExchanges: parsedContractTerms.exchanges.map((x) => ({
exchangeBaseUrl: x.url,
exchangePub: x.master_pub,
@@ -798,7 +794,7 @@ async function handleInsufficientFunds(
});
const res = await selectPayCoinsNew(ws, {
- auditors: contractData.allowedAuditors,
+ auditors: [],
exchanges: contractData.allowedExchanges,
wireMethod: contractData.wireMethod,
contractTermsAmount: Amounts.parseOrThrow(contractData.amount),
@@ -921,7 +917,7 @@ export async function checkPaymentByProposalId(
if (!purchase || purchase.purchaseStatus === PurchaseStatus.Proposed) {
// If not already paid, check if we could pay for it.
const res = await selectPayCoinsNew(ws, {
- auditors: contractData.allowedAuditors,
+ auditors: [],
exchanges: contractData.allowedExchanges,
contractTermsAmount: Amounts.parseOrThrow(contractData.amount),
depositFeeLimit: Amounts.parseOrThrow(contractData.maxDepositFee),
@@ -1266,7 +1262,7 @@ export async function confirmPay(
const contractData = d.contractData;
const selectCoinsResult = await selectPayCoinsNew(ws, {
- auditors: contractData.allowedAuditors,
+ auditors: [],
exchanges: contractData.allowedExchanges,
wireMethod: contractData.wireMethod,
contractTermsAmount: Amounts.parseOrThrow(contractData.amount),
diff --git
a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx
b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx
index ef88d1c28..554d2f88e 100644
---
a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx
+++
b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx
@@ -51,12 +51,6 @@ const cd: WalletContractData = {
t_s: 1660002673,
},
wireFeeAmortization: 1,
- allowedAuditors: [
- {
- auditorBaseUrl: "https://auditor.taler.ar/",
- auditorPub: "0000000000000000000000000000000000000000000000000000",
- },
- ],
allowedExchanges: [
{
exchangeBaseUrl: "https://exchange.taler.ar/",
diff --git
a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx
b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx
index 8e799902f..1023fc8f3 100644
---
a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx
+++
b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx
@@ -407,21 +407,6 @@ export function ShowView({ contractTerms, hideHandler }:
States.Show): VNode {
</td>
<td>{contractTerms.wireFeeAmortization}</td>
</tr>
- <tr>
- <td>
- <i18n.Translate>Auditors</i18n.Translate>
- </td>
- <td>
- {(contractTerms.allowedAuditors || []).map((e) => (
- <Fragment key={e.auditorPub}>
- <a href={e.auditorBaseUrl} title={e.auditorPub}>
- {e.auditorPub.substring(0, 6)}...
- </a>
-
- </Fragment>
- ))}
- </td>
- </tr>
<tr>
<td>
<i18n.Translate>Exchanges</i18n.Translate>
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: wallet-core: remove allowed auditors from contract terms,
gnunet <=