aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-05-05 13:29:49 +0200
committerFlorian Dold <florian@dold.me>2023-05-05 13:29:49 +0200
commitcbf0f839542f7eda88cdc2a5c7b602e690309154 (patch)
tree5d5530f11947bd218577d7b9857e1a3752ddb2b5 /packages
parent60805f3ff88d7ecd149a88ec7cea846384155c5b (diff)
wallet-core: remove allowed auditors from contract terms
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-util/src/taler-types.ts6
-rw-r--r--packages/taler-wallet-core/src/db.ts1
-rw-r--r--packages/taler-wallet-core/src/operations/deposits.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/pay-merchant.ts10
-rw-r--r--packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx6
-rw-r--r--packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx15
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
@@ -449,11 +449,6 @@ export interface MerchantContractTerms {
amount: string;
/**
- * Auditors accepted by the merchant.
- */
- auditors: AuditorHandle[];
-
- /**
* Deadline to pay for the contract.
*/
pay_deadline: TalerProtocolTimestamp;
@@ -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
@@ -409,21 +409,6 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode {
</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>
- &nbsp;
- </Fragment>
- ))}
- </td>
- </tr>
- <tr>
- <td>
<i18n.Translate>Exchanges</i18n.Translate>
</td>
<td>