summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-03-19 23:02:24 -0300
committerSebastian <sebasjm@gmail.com>2024-03-19 23:02:24 -0300
commitc09caa5fdca91fb6ded6b2ce8caf1620c0273b80 (patch)
tree70d73ec63630b13fe83e738d606e2f4eabf5d235 /packages
parent630f53f8a5721b2f5f2d43772aa4de7146df58fc (diff)
downloadwallet-core-c09caa5fdca91fb6ded6b2ce8caf1620c0273b80.tar.gz
wallet-core-c09caa5fdca91fb6ded6b2ce8caf1620c0273b80.tar.bz2
wallet-core-c09caa5fdca91fb6ded6b2ce8caf1620c0273b80.zip
wip, found #8653
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-harness/src/integrationtests/test-wallet-wirefees.ts1
-rw-r--r--packages/taler-util/src/MerchantApiClient.ts7
-rw-r--r--packages/taler-util/src/http-client/types.ts2
-rw-r--r--packages/taler-util/src/merchant-api-types.ts26
-rw-r--r--packages/taler-util/src/taler-types.ts106
-rw-r--r--packages/taler-util/src/wallet-types.ts14
-rw-r--r--packages/taler-wallet-core/src/deposits.ts15
-rw-r--r--packages/taler-wallet-core/src/pay-merchant.ts26
-rw-r--r--packages/taler-wallet-webextension/src/components/PaymentButtons.tsx26
-rw-r--r--packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx1
-rw-r--r--packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx16
11 files changed, 45 insertions, 195 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-wallet-wirefees.ts b/packages/taler-harness/src/integrationtests/test-wallet-wirefees.ts
index 618b8a144..1bf9bd659 100644
--- a/packages/taler-harness/src/integrationtests/test-wallet-wirefees.ts
+++ b/packages/taler-harness/src/integrationtests/test-wallet-wirefees.ts
@@ -134,7 +134,6 @@ export async function runWalletWirefeesTest(t: GlobalTestState) {
fulfillment_url: "taler://fulfillment-success/thx",
//max_wire_fee: "TESTKUDOS:0.1",
max_fee: "TESTKUDOS:0.1",
- wire_fee_amortization: 1,
} satisfies Partial<MerchantContractTerms>;
const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl());
diff --git a/packages/taler-util/src/MerchantApiClient.ts b/packages/taler-util/src/MerchantApiClient.ts
index a71887940..65827849d 100644
--- a/packages/taler-util/src/MerchantApiClient.ts
+++ b/packages/taler-util/src/MerchantApiClient.ts
@@ -18,6 +18,7 @@ import { codecForAny } from "./codec.js";
import {
TalerMerchantApi,
codecForMerchantConfig,
+ codecForMerchantOrderPrivateStatusResponse,
} from "./http-client/types.js";
import { HttpStatusCode } from "./http-status-codes.js";
import {
@@ -30,12 +31,10 @@ import { LibtoolVersion } from "./libtool-version.js";
import { Logger } from "./logging.js";
import {
MerchantInstancesResponse,
- MerchantOrderPrivateStatusResponse,
MerchantPostOrderRequest,
MerchantPostOrderResponse,
MerchantTemplateAddDetails,
- codecForMerchantOrderPrivateStatusResponse,
- codecForMerchantPostOrderResponse,
+ codecForMerchantPostOrderResponse
} from "./merchant-api-types.js";
import {
FailCasesByMethod,
@@ -258,7 +257,7 @@ export class MerchantApiClient {
async queryPrivateOrderStatus(
query: PrivateOrderStatusQuery,
- ): Promise<MerchantOrderPrivateStatusResponse> {
+ ): Promise<TalerMerchantApi.MerchantOrderStatusResponse> {
const reqUrl = new URL(`private/orders/${query.orderId}`, this.baseUrl);
if (query.sessionId) {
reqUrl.searchParams.set("session_id", query.sessionId);
diff --git a/packages/taler-util/src/http-client/types.ts b/packages/taler-util/src/http-client/types.ts
index b53566304..67719ddd9 100644
--- a/packages/taler-util/src/http-client/types.ts
+++ b/packages/taler-util/src/http-client/types.ts
@@ -606,7 +606,7 @@ export const codecForExchange = (): Codec<TalerMerchantApi.Exchange> =>
.property("master_pub", codecForString())
.property("priority", codecForNumber())
.property("url", codecForString())
- .build("ExchangeHandle");
+ .build("TalerMerchantApi.Exchange");
export const codecForContractTerms = (): Codec<TalerMerchantApi.ContractTerms> =>
buildCodecForObject<TalerMerchantApi.ContractTerms>()
diff --git a/packages/taler-util/src/merchant-api-types.ts b/packages/taler-util/src/merchant-api-types.ts
index 838bfa99d..6d5570b61 100644
--- a/packages/taler-util/src/merchant-api-types.ts
+++ b/packages/taler-util/src/merchant-api-types.ts
@@ -40,6 +40,8 @@ import {
codecForAmountString,
codecForAny,
codecForBoolean,
+ codecForCheckPaymentClaimedResponse,
+ codecForCheckPaymentUnpaidResponse,
codecForConstString,
codecForExchangeWireAccount,
codecForList,
@@ -112,30 +114,6 @@ export const codecForMerchantCheckPaymentPaidResponse =
.property("refund_details", codecForAny())
.build("CheckPaymentPaidResponse");
-export const codecForCheckPaymentUnpaidResponse =
- (): Codec<CheckPaymentUnpaidResponse> =>
- buildCodecForObject<CheckPaymentUnpaidResponse>()
- .property("order_status", codecForConstString("unpaid"))
- .property("taler_pay_uri", codecForString())
- .property("order_status_url", codecForString())
- .property("already_paid_order_id", codecOptional(codecForString()))
- .build("CheckPaymentPaidResponse");
-
-export const codecForCheckPaymentClaimedResponse =
- (): Codec<CheckPaymentClaimedResponse> =>
- buildCodecForObject<CheckPaymentClaimedResponse>()
- .property("order_status", codecForConstString("claimed"))
- .property("contract_terms", codecForMerchantContractTerms())
- .build("CheckPaymentClaimedResponse");
-
-export const codecForMerchantOrderPrivateStatusResponse =
- (): Codec<MerchantOrderPrivateStatusResponse> =>
- buildCodecForUnion<MerchantOrderPrivateStatusResponse>()
- .discriminateOn("order_status")
- .alternative("paid", codecForMerchantCheckPaymentPaidResponse())
- .alternative("unpaid", codecForCheckPaymentUnpaidResponse())
- .alternative("claimed", codecForCheckPaymentClaimedResponse())
- .build("MerchantOrderPrivateStatusResponse");
export type MerchantOrderPrivateStatusResponse =
| MerchantCheckPaymentPaidResponse
diff --git a/packages/taler-util/src/taler-types.ts b/packages/taler-util/src/taler-types.ts
index e8a6fca7a..7a386b108 100644
--- a/packages/taler-util/src/taler-types.ts
+++ b/packages/taler-util/src/taler-types.ts
@@ -46,6 +46,7 @@ import {
CurrencySpecification,
codecForCurrencySpecificiation,
codecForEither,
+ codecForProduct,
} from "./index.js";
import { Edx25519PublicKeyEnc } from "./taler-crypto.js";
import {
@@ -306,18 +307,6 @@ export interface ExchangeHandle {
// The exchange's base URL.
url: string;
- // How much would the merchant like to use this exchange.
- // The wallet should use a suitable exchange with high
- // priority. The following priority values are used, but
- // it should be noted that they are NOT in any way normative.
- //
- // 0: likely it will not work (recently seen with account
- // restriction that would be bad for this merchant)
- // 512: merchant does not know, might be down (merchant
- // did not yet get /wire response).
- // 1024: good choice (recently confirmed working)
- priority: Integer;
-
// Master public key of the exchange.
master_pub: EddsaPublicKeyString;
}
@@ -486,7 +475,7 @@ export interface MerchantContractTerms {
// Total price for the transaction.
// The exchange will subtract deposit fees from that amount
// before transferring it to the merchant.
- amount: AmountString;
+ amount: string;
// Nonce generated by the wallet and echoed by the merchant
// in this field when the proposal is generated.
@@ -568,7 +557,7 @@ export interface MerchantContractTerms {
// Maximum total deposit fee accepted by the merchant for this contract.
// Overrides defaults of the merchant instance.
- max_fee: AmountString;
+ max_fee: string;
// Extra data that is only interpreted by the merchant frontend.
// Useful when the merchant needs to store extra information on a
@@ -1394,7 +1383,6 @@ export const codecForAuditor = (): Codec<ExchangeAuditor> =>
export const codecForExchangeHandle = (): Codec<ExchangeHandle> =>
buildCodecForObject<ExchangeHandle>()
.property("master_pub", codecForString())
- .property("priority", codecForNumber())
.property("url", codecForString())
.build("ExchangeHandle");
@@ -1426,27 +1414,10 @@ export const codecForMerchantInfo = (): Codec<MerchantInfo> =>
.property("jurisdiction", codecOptional(codecForLocation()))
.build("MerchantInfo");
-export const codecForTax = (): Codec<Tax> =>
- buildCodecForObject<Tax>()
- .property("name", codecForString())
- .property("tax", codecForAmountString())
- .build("Tax");
export const codecForInternationalizedString =
(): Codec<InternationalizedString> => codecForMap(codecForString());
-export const codecForProduct = (): Codec<Product> =>
- buildCodecForObject<Product>()
- .property("product_id", codecOptional(codecForString()))
- .property("description", codecForString())
- .property(
- "description_i18n",
- codecOptional(codecForInternationalizedString()),
- )
- .property("quantity", codecOptional(codecForNumber()))
- .property("unit", codecOptional(codecForString()))
- .property("price", codecOptional(codecForAmountString()))
- .build("Tax");
export const codecForMerchantContractTerms = (): Codec<MerchantContractTerms> =>
buildCodecForObject<MerchantContractTerms>()
@@ -1663,40 +1634,6 @@ export const codecForExchangeRevealResponse =
.property("ev_sigs", codecForList(codecForExchangeRevealItem()))
.build("ExchangeRevealResponse");
-export const codecForMerchantCoinRefundSuccessStatus =
- (): Codec<MerchantCoinRefundSuccessStatus> =>
- buildCodecForObject<MerchantCoinRefundSuccessStatus>()
- .property("type", codecForConstString("success"))
- .property("coin_pub", codecForString())
- .property("exchange_status", codecForConstNumber(200))
- .property("exchange_sig", codecForString())
- .property("rtransaction_id", codecForNumber())
- .property("refund_amount", codecForAmountString())
- .property("exchange_pub", codecForString())
- .property("execution_time", codecForTimestamp)
- .build("MerchantCoinRefundSuccessStatus");
-
-export const codecForMerchantCoinRefundFailureStatus =
- (): Codec<MerchantCoinRefundFailureStatus> =>
- buildCodecForObject<MerchantCoinRefundFailureStatus>()
- .property("type", codecForConstString("failure"))
- .property("coin_pub", codecForString())
- .property("exchange_status", codecForNumber())
- .property("rtransaction_id", codecForNumber())
- .property("refund_amount", codecForAmountString())
- .property("exchange_code", codecOptional(codecForNumber()))
- .property("exchange_reply", codecOptional(codecForAny()))
- .property("execution_time", codecForTimestamp)
- .build("MerchantCoinRefundFailureStatus");
-
-export const codecForMerchantCoinRefundStatus =
- (): Codec<MerchantCoinRefundStatus> =>
- buildCodecForUnion<MerchantCoinRefundStatus>()
- .discriminateOn("type")
- .alternative("success", codecForMerchantCoinRefundSuccessStatus())
- .alternative("failure", codecForMerchantCoinRefundFailureStatus())
- .build("MerchantCoinRefundStatus");
-
export const codecForMerchantOrderStatusPaid =
(): Codec<MerchantOrderStatusPaid> =>
buildCodecForObject<MerchantOrderStatusPaid>()
@@ -1706,13 +1643,6 @@ export const codecForMerchantOrderStatusPaid =
.property("refunded", codecForBoolean())
.build("MerchantOrderStatusPaid");
-export const codecForMerchantOrderRefundPickupResponse =
- (): Codec<MerchantOrderRefundResponse> =>
- buildCodecForObject<MerchantOrderRefundResponse>()
- .property("merchant_pub", codecForString())
- .property("refund_amount", codecForAmountString())
- .property("refunds", codecForList(codecForMerchantCoinRefundStatus()))
- .build("MerchantOrderRefundPickupResponse");
export const codecForMerchantOrderStatusUnpaid =
(): Codec<MerchantOrderStatusUnpaid> =>
@@ -1751,36 +1681,6 @@ export interface AbortResponse {
refunds: MerchantAbortPayRefundStatus[];
}
-export const codecForMerchantAbortPayRefundSuccessStatus =
- (): Codec<MerchantAbortPayRefundSuccessStatus> =>
- buildCodecForObject<MerchantAbortPayRefundSuccessStatus>()
- .property("exchange_pub", codecForString())
- .property("exchange_sig", codecForString())
- .property("exchange_status", codecForConstNumber(200))
- .property("type", codecForConstString("success"))
- .build("MerchantAbortPayRefundSuccessStatus");
-
-export const codecForMerchantAbortPayRefundFailureStatus =
- (): Codec<MerchantAbortPayRefundFailureStatus> =>
- buildCodecForObject<MerchantAbortPayRefundFailureStatus>()
- .property("exchange_code", codecForNumber())
- .property("exchange_reply", codecForAny())
- .property("exchange_status", codecForNumber())
- .property("type", codecForConstString("failure"))
- .build("MerchantAbortPayRefundFailureStatus");
-
-export const codecForMerchantAbortPayRefundStatus =
- (): Codec<MerchantAbortPayRefundStatus> =>
- buildCodecForUnion<MerchantAbortPayRefundStatus>()
- .discriminateOn("type")
- .alternative("success", codecForMerchantAbortPayRefundSuccessStatus())
- .alternative("failure", codecForMerchantAbortPayRefundFailureStatus())
- .build("MerchantAbortPayRefundStatus");
-
-export const codecForAbortResponse = (): Codec<AbortResponse> =>
- buildCodecForObject<AbortResponse>()
- .property("refunds", codecForList(codecForMerchantAbortPayRefundStatus()))
- .build("AbortResponse");
export type MerchantAbortPayRefundStatus =
| MerchantAbortPayRefundSuccessStatus
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index 4ebaa3668..61b9e1b59 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -628,11 +628,11 @@ export interface CoinDumpJson {
withdrawal_reserve_pub: string | undefined;
coin_status: CoinStatus;
spend_allocation:
- | {
- id: string;
- amount: AmountString;
- }
- | undefined;
+ | {
+ id: string;
+ amount: AmountString;
+ }
+ | undefined;
/**
* Information about the age restriction
*/
@@ -831,7 +831,7 @@ export const codecForPreparePayResultPaymentPossible =
)
.build("PreparePayResultPaymentPossible");
-export interface BalanceDetails {}
+export interface BalanceDetails { }
/**
* Detailed reason for why the wallet's balance is insufficient.
@@ -2947,7 +2947,6 @@ export interface WalletContractData {
summary: string;
summaryI18n: { [lang_tag: string]: string } | undefined;
autoRefund: TalerProtocolDuration | undefined;
- wireFeeAmortization: number;
payDeadline: TalerProtocolTimestamp;
refundDeadline: TalerProtocolTimestamp;
allowedExchanges: AllowedExchangeInfo[];
@@ -2955,7 +2954,6 @@ export interface WalletContractData {
wireMethod: string;
wireInfoHash: string;
maxDepositFee: AmountString;
- minimumAge?: number;
}
export interface TestingWaitTransactionRequest {
diff --git a/packages/taler-wallet-core/src/deposits.ts b/packages/taler-wallet-core/src/deposits.ts
index 93f70c2ce..6c04b20de 100644
--- a/packages/taler-wallet-core/src/deposits.ts
+++ b/packages/taler-wallet-core/src/deposits.ts
@@ -33,6 +33,7 @@ import {
DepositGroupFees,
Duration,
ExchangeBatchDepositRequest,
+ ExchangeHandle,
ExchangeRefundRequest,
HttpStatusCode,
Logger,
@@ -754,9 +755,9 @@ async function processDepositGroupPendingTrack(
let updatedTxStatus: DepositElementStatus | undefined = undefined;
let newWiredCoin:
| {
- id: string;
- value: DepositTrackingInfo;
- }
+ id: string;
+ value: DepositTrackingInfo;
+ }
| undefined;
if (depositGroup.statusPerCoin[i] !== DepositElementStatus.Wired) {
@@ -1167,7 +1168,7 @@ export async function prepareDepositGroup(
}
const amount = Amounts.parseOrThrow(req.amount);
- const exchangeInfos: { url: string; master_pub: string }[] = [];
+ const exchangeInfos: ExchangeHandle[] = [];
await wex.db.runReadOnlyTx(["exchangeDetails", "exchanges"], async (tx) => {
const allExchanges = await tx.exchanges.iter().toArray();
@@ -1189,7 +1190,6 @@ export async function prepareDepositGroup(
exchanges: exchangeInfos,
amount: req.amount,
max_fee: Amounts.stringify(amount),
- max_wire_fee: Amounts.stringify(amount),
wire_method: p.targetType,
timestamp: nowRounded,
merchant_base_url: "",
@@ -1226,7 +1226,7 @@ export async function prepareDepositGroup(
restrictWireMethod: contractData.wireMethod,
contractTermsAmount: Amounts.parseOrThrow(contractData.amount),
depositFeeLimit: Amounts.parseOrThrow(contractData.maxDepositFee),
- wireFeeAmortization: contractData.wireFeeAmortization ?? 1,
+ wireFeeAmortization: 1, // FIXME #8653
prevPayCoins: [],
});
@@ -1309,7 +1309,6 @@ export async function createDepositGroup(
exchanges: exchangeInfos,
amount: req.amount,
max_fee: Amounts.stringify(amount),
- max_wire_fee: Amounts.stringify(amount),
wire_method: p.targetType,
timestamp: nowRounded,
merchant_base_url: "",
@@ -1346,7 +1345,7 @@ export async function createDepositGroup(
restrictWireMethod: contractData.wireMethod,
contractTermsAmount: Amounts.parseOrThrow(contractData.amount),
depositFeeLimit: Amounts.parseOrThrow(contractData.maxDepositFee),
- wireFeeAmortization: contractData.wireFeeAmortization ?? 1,
+ wireFeeAmortization: 1, // FIXME #8653
prevPayCoins: [],
});
diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts
index 872e554c9..e473566b0 100644
--- a/packages/taler-wallet-core/src/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/pay-merchant.ts
@@ -36,11 +36,11 @@ import {
checkDbInvariant,
codecForAbortResponse,
codecForMerchantContractTerms,
- codecForMerchantOrderRefundPickupResponse,
codecForMerchantOrderStatusPaid,
codecForMerchantPayResponse,
codecForMerchantPostOrderResponse,
codecForProposal,
+ codecForWalletRefundResponse,
CoinDepositPermission,
CoinRefreshRequest,
ConfirmPayResult,
@@ -580,7 +580,6 @@ export function extractContractData(
autoRefund: parsedContractTerms.auto_refund,
payDeadline: parsedContractTerms.pay_deadline,
refundDeadline: parsedContractTerms.refund_deadline,
- wireFeeAmortization: parsedContractTerms.wire_fee_amortization || 1,
allowedExchanges: parsedContractTerms.exchanges.map((x) => ({
exchangeBaseUrl: x.url,
exchangePub: x.master_pub,
@@ -591,7 +590,6 @@ export function extractContractData(
maxDepositFee: Amounts.stringify(parsedContractTerms.max_fee),
merchant: parsedContractTerms.merchant,
summaryI18n: parsedContractTerms.summary_i18n,
- minimumAge: parsedContractTerms.minimum_age,
};
}
@@ -611,8 +609,7 @@ async function processDownloadProposal(
if (proposal.purchaseStatus != PurchaseStatus.PendingDownloadingProposal) {
logger.error(
- `unexpected state ${proposal.purchaseStatus}/${
- PurchaseStatus[proposal.purchaseStatus]
+ `unexpected state ${proposal.purchaseStatus}/${PurchaseStatus[proposal.purchaseStatus]
} for ${ctx.transactionId} in processDownloadProposal`,
);
return TaskRunResult.finished();
@@ -868,8 +865,7 @@ async function createOrReusePurchase(
oldProposal.claimToken === claimToken
) {
logger.info(
- `Found old proposal (status=${
- PurchaseStatus[oldProposal.purchaseStatus]
+ `Found old proposal (status=${PurchaseStatus[oldProposal.purchaseStatus]
}) for order ${orderId} at ${merchantBaseUrl}`,
);
if (oldProposal.purchaseStatus === PurchaseStatus.DialogShared) {
@@ -1149,9 +1145,9 @@ async function handleInsufficientFunds(
restrictWireMethod: contractData.wireMethod,
contractTermsAmount: Amounts.parseOrThrow(contractData.amount),
depositFeeLimit: Amounts.parseOrThrow(contractData.maxDepositFee),
- wireFeeAmortization: contractData.wireFeeAmortization ?? 1,
+ wireFeeAmortization: 1, // FIXME #8653
prevPayCoins,
- requiredMinimumAge: contractData.minimumAge,
+ requiredMinimumAge: undefined, // FIXME #8653
});
if (res.type !== "success") {
@@ -1278,9 +1274,9 @@ async function checkPaymentByProposalId(
},
contractTermsAmount: instructedAmount,
depositFeeLimit: Amounts.parseOrThrow(contractData.maxDepositFee),
- wireFeeAmortization: contractData.wireFeeAmortization ?? 1,
+ wireFeeAmortization: 1, // FIXME #8653
prevPayCoins: [],
- requiredMinimumAge: contractData.minimumAge,
+ requiredMinimumAge: undefined, // FIXME #8653
restrictWireMethod: contractData.wireMethod,
});
@@ -1634,7 +1630,7 @@ export async function generateDepositPermissions(
timestamp: contractData.timestamp,
wireInfoHash,
ageCommitmentProof: coin.ageCommitmentProof,
- requiredMinimumAge: contractData.minimumAge,
+ requiredMinimumAge: undefined,// FIXME #8653
});
depositPermissions.push(dp);
}
@@ -1817,9 +1813,9 @@ export async function confirmPay(
restrictWireMethod: contractData.wireMethod,
contractTermsAmount: Amounts.parseOrThrow(contractData.amount),
depositFeeLimit: Amounts.parseOrThrow(contractData.maxDepositFee),
- wireFeeAmortization: contractData.wireFeeAmortization ?? 1,
+ wireFeeAmortization: 1, // FIXME #8653
prevPayCoins: [],
- requiredMinimumAge: contractData.minimumAge,
+ requiredMinimumAge: undefined, // FIXME #8653
forcedSelection: forcedCoinSel,
});
@@ -2887,7 +2883,7 @@ async function processPurchaseAcceptRefund(
const refundResponse = await readSuccessResponseJsonOrThrow(
request,
- codecForMerchantOrderRefundPickupResponse(),
+ codecForWalletRefundResponse(),
);
return await storeRefunds(
wex,
diff --git a/packages/taler-wallet-webextension/src/components/PaymentButtons.tsx b/packages/taler-wallet-webextension/src/components/PaymentButtons.tsx
index 8eb3c6e7a..7fa0376c9 100644
--- a/packages/taler-wallet-webextension/src/components/PaymentButtons.tsx
+++ b/packages/taler-wallet-webextension/src/components/PaymentButtons.tsx
@@ -80,39 +80,34 @@ export function PaymentButtons({
case "age-acceptable": {
BalanceMessage = i18n.str`Balance is not enough because you have ${Amounts.stringifyValue(
payStatus.balanceDetails.balanceAgeAcceptable,
- )} ${amount.currency} to pay for contracts restricted for age above ${
- payStatus.contractTerms.minimum_age
- } years old`;
+ )} ${amount.currency} to pay for this contract which is restricted.`;
break;
}
case "available": {
BalanceMessage = i18n.str`Balance is not enough because you have ${Amounts.stringifyValue(
payStatus.balanceDetails.balanceAvailable,
- )} ${amount.currency} available.`;
+ )} ${amount.currency} available.`;
break;
}
case "merchant-acceptable": {
BalanceMessage = i18n.str`Balance is not enough because merchant will just accept ${Amounts.stringifyValue(
payStatus.balanceDetails.balanceReceiverAcceptable,
- )} ${
- amount.currency
- } . To know more you can check which exchange and auditors the merchant trust.`;
+ )} ${amount.currency
+ } . To know more you can check which exchange and auditors the merchant trust.`;
break;
}
case "merchant-depositable": {
BalanceMessage = i18n.str`Balance is not enough because merchant will just accept ${Amounts.stringifyValue(
payStatus.balanceDetails.balanceReceiverDepositable,
- )} ${
- amount.currency
- } . To know more you can check which wire methods the merchant accepts.`;
+ )} ${amount.currency
+ } . To know more you can check which wire methods the merchant accepts.`;
break;
}
case "material": {
BalanceMessage = i18n.str`Balance is not enough because you have ${Amounts.stringifyValue(
payStatus.balanceDetails.balanceMaterial,
- )} ${
- amount.currency
- } to spend right know. There are some coins that need to be refreshed.`;
+ )} ${amount.currency
+ } to spend right know. There are some coins that need to be refreshed.`;
break;
}
case "fee-gap": {
@@ -123,9 +118,8 @@ export function PaymentButtons({
payStatus.balanceDetails.maxEffectiveSpendAmount,
).amount,
),
- )} ${
- amount.currency
- } more balance in your wallet or ask your merchant to cover more of the fees.`;
+ )} ${amount.currency
+ } more balance in your wallet or ask your merchant to cover more of the fees.`;
break;
}
default:
diff --git a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx
index 7142089cb..99e2d0a76 100644
--- a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx
+++ b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx
@@ -48,7 +48,6 @@ const cd: WalletContractData = {
refundDeadline: {
t_s: 1660002673,
},
- wireFeeAmortization: 1,
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 6346b475a..b0f43d0d9 100644
--- a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx
+++ b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx
@@ -337,8 +337,8 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode {
!contractTerms.autoRefund
? Duration.getZero()
: Duration.fromTalerProtocolDuration(
- contractTerms.autoRefund,
- ),
+ contractTerms.autoRefund,
+ ),
)}
format="dd MMMM yyyy, HH:mm"
/>
@@ -384,12 +384,6 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode {
<Amount value={contractTerms.maxDepositFee} />
</td>
</tr>
- <tr>
- <td>
- <i18n.Translate>Minimum age</i18n.Translate>
- </td>
- <td>{contractTerms.minimumAge}</td>
- </tr>
{/* <tr>
<td>Extra</td>
<td>
@@ -398,12 +392,6 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode {
</tr> */}
<tr>
<td>
- <i18n.Translate>Wire fee amortization</i18n.Translate>
- </td>
- <td>{contractTerms.wireFeeAmortization}</td>
- </tr>
- <tr>
- <td>
<i18n.Translate>Exchanges</i18n.Translate>
</td>
<td>