diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-09-08 20:45:33 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-09-08 20:45:33 +0530 |
commit | ddbb09b1403214cff3e5a598dc51bdf37df72971 (patch) | |
tree | 0238eb77bbfb623e98b9660e1eac53c88a74e66f /packages/taler-wallet-core/src/types/dbTypes.ts | |
parent | f79d10eea291acba42dd27e5900d2128a1242daa (diff) | |
download | wallet-core-ddbb09b1403214cff3e5a598dc51bdf37df72971.tar.xz |
DB tweaks
Diffstat (limited to 'packages/taler-wallet-core/src/types/dbTypes.ts')
-rw-r--r-- | packages/taler-wallet-core/src/types/dbTypes.ts | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/types/dbTypes.ts b/packages/taler-wallet-core/src/types/dbTypes.ts index 0074409e8..62eadc78b 100644 --- a/packages/taler-wallet-core/src/types/dbTypes.ts +++ b/packages/taler-wallet-core/src/types/dbTypes.ts @@ -27,7 +27,6 @@ import { AmountJson } from "../util/amounts"; import { Auditor, CoinDepositPermission, - TipResponse, ExchangeSignKeyJson, MerchantInfo, Product, @@ -43,8 +42,7 @@ import { ReserveClosingTransaction, ReserveRecoupTransaction, } from "./ReserveTransaction"; -import { Timestamp, Duration, getTimestampNow } from "../util/time"; -import { PayCoinSelection, PayCostInfo } from "../operations/pay"; +import { Timestamp, Duration } from "../util/time"; import { IDBKeyPath } from "idb-bridge"; import { RetryInfo } from "../util/retries"; @@ -1256,6 +1254,37 @@ export interface WalletContractData { } /** + * Result of selecting coins, contains the exchange, and selected + * coins with their denomination. + */ +export interface PayCoinSelection { + /** + * Amount requested by the merchant. + */ + paymentAmount: AmountJson; + + /** + * Public keys of the coins that were selected. + */ + coinPubs: string[]; + + /** + * Amount that each coin contributes. + */ + coinContributions: AmountJson[]; + + /** + * How much of the wire fees is the customer paying? + */ + customerWireFees: AmountJson; + + /** + * How much of the deposit fees is the customer paying? + */ + customerDepositFees: AmountJson; +} + +/** * Record that stores status information about one purchase, starting from when * the customer accepts a proposal. Includes refund status if applicable. */ @@ -1280,7 +1309,7 @@ export interface PurchaseRecord { payCoinSelection: PayCoinSelection; - payCostInfo: PayCostInfo; + totalPayCost: AmountJson; /** * Timestamp of the first time that sending a payment to the merchant |