aboutsummaryrefslogtreecommitdiff
path: root/src/types
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-05-12 15:44:48 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-05-12 15:44:48 +0530
commit67dd0eb06e04466ca01a03955ff8f75d40429c79 (patch)
tree5b4fe00a91d41a5cb758c4983575ec65e4331f76 /src/types
parent6206b418ff88a238762a18e7b6eeaceafc5de294 (diff)
downloadwallet-core-67dd0eb06e04466ca01a03955ff8f75d40429c79.tar.xz
new transactions API: purchases and refunds
Diffstat (limited to 'src/types')
-rw-r--r--src/types/dbTypes.ts4
-rw-r--r--src/types/transactions.ts8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/types/dbTypes.ts b/src/types/dbTypes.ts
index 07c59d4d3..eae39fff3 100644
--- a/src/types/dbTypes.ts
+++ b/src/types/dbTypes.ts
@@ -43,6 +43,7 @@ import {
ReserveRecoupTransaction,
} from "./ReserveTransaction";
import { Timestamp, Duration, getTimestampNow } from "../util/time";
+import { PayCoinSelection } from "../operations/pay";
export enum ReserveRecordStatus {
/**
@@ -1133,6 +1134,7 @@ export const enum RefundReason {
}
export interface RefundGroupInfo {
+ refundGroupId: string;
timestampQueried: Timestamp;
reason: RefundReason;
}
@@ -1222,6 +1224,8 @@ export interface PurchaseRecord {
*/
payReq: PayReq;
+ payCoinSelection: PayCoinSelection;
+
/**
* Timestamp of the first time that sending a payment to the merchant
* for this purchase was successful.
diff --git a/src/types/transactions.ts b/src/types/transactions.ts
index d2f0f6cbc..7dda46f73 100644
--- a/src/types/transactions.ts
+++ b/src/types/transactions.ts
@@ -115,7 +115,7 @@ interface TransactionPayment extends TransactionCommon {
type: TransactionType.Payment;
// Additional information about the payment.
- info: TransactionInfo;
+ info: PaymentShortInfo;
// true if the payment failed, false otherwise.
// Note that failed payments with zero effective amount will not be returned by the API.
@@ -125,11 +125,11 @@ interface TransactionPayment extends TransactionCommon {
amountRaw: AmountString;
// Amount that was paid, including deposit, wire and refresh fees.
- amountEffective: AmountString;
+ amountEffective?: AmountString;
}
-interface TransactionInfo {
+interface PaymentShortInfo {
// Order ID, uniquely identifies the order within a merchant instance
orderId: string;
@@ -157,7 +157,7 @@ interface TransactionRefund extends TransactionCommon {
refundedTransactionId: string;
// Additional information about the refunded payment
- info: TransactionInfo;
+ info: PaymentShortInfo;
// Part of the refund that couldn't be applied because the refund permissions were expired
amountInvalid: AmountString;