aboutsummaryrefslogtreecommitdiff
path: root/src/types
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-16 22:52:56 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-16 22:52:56 +0530
commit85a095fa7d4d31e1e84e5e096fa28c59f3cd1918 (patch)
treebfad4a87f540c0ae1480fd2ab80911045f7f912e /src/types
parentdd3a31f33dc54b475b204e15d8d0a5c5e2a70ee8 (diff)
downloadwallet-core-85a095fa7d4d31e1e84e5e096fa28c59f3cd1918.tar.xz
manual withdrawalv0.7.1-dev.8v0.7.1-dev.7
Diffstat (limited to 'src/types')
-rw-r--r--src/types/dbTypes.ts26
-rw-r--r--src/types/walletTypes.ts16
2 files changed, 26 insertions, 16 deletions
diff --git a/src/types/dbTypes.ts b/src/types/dbTypes.ts
index 55f16f40b..4f7b89b67 100644
--- a/src/types/dbTypes.ts
+++ b/src/types/dbTypes.ts
@@ -49,11 +49,6 @@ import { PayCoinSelection, PayCostInfo } from "../operations/pay";
export enum ReserveRecordStatus {
/**
- * Waiting for manual confirmation.
- */
- UNCONFIRMED = "unconfirmed",
-
- /**
* Reserve must be registered with the bank.
*/
REGISTERING_BANK = "registering-bank",
@@ -219,8 +214,18 @@ export interface ReserveHistoryRecord {
}
export interface ReserveBankInfo {
+ /**
+ * Status URL that the wallet will use to query the status
+ * of the Taler withdrawal operation on the bank's side.
+ */
statusUrl: string;
+
confirmUrl?: string;
+
+ /**
+ * Exchange payto URI that the bank will use to fund the reserve.
+ */
+ exchangePaytoUri: string;
}
/**
@@ -262,12 +267,11 @@ export interface ReserveRecord {
timestampReserveInfoPosted: Timestamp | undefined;
/**
- * Time when the reserve was confirmed, either manually by the user
- * or by the bank.
+ * Time when the reserve was confirmed by the bank.
*
* Set to undefined if not confirmed yet.
*/
- timestampConfirmed: Timestamp | undefined;
+ timestampBankConfirmed: Timestamp | undefined;
/**
* Wire information (as payto URI) for the bank account that
@@ -276,12 +280,6 @@ export interface ReserveRecord {
senderWire?: string;
/**
- * Wire information (as payto URI) for the exchange, specifically
- * the account that was transferred to when creating the reserve.
- */
- exchangeWire: string;
-
- /**
* Amount that was sent by the user to fund the reserve.
*/
instructedAmount: AmountJson;
diff --git a/src/types/walletTypes.ts b/src/types/walletTypes.ts
index 74f2428dd..63b20095e 100644
--- a/src/types/walletTypes.ts
+++ b/src/types/walletTypes.ts
@@ -246,7 +246,7 @@ export interface CreateReserveRequest {
* Payto URI that identifies the exchange's account that the funds
* for this reserve go into.
*/
- exchangeWire: string;
+ exchangePaytoUri?: string;
/**
* Wire details (as a payto URI) for the bank account that sent the funds to
@@ -264,7 +264,7 @@ export const codecForCreateReserveRequest = (): Codec<CreateReserveRequest> =>
makeCodecForObject<CreateReserveRequest>()
.property("amount", codecForAmountJson())
.property("exchange", codecForString)
- .property("exchangeWire", codecForString)
+ .property("exchangePaytoUri", codecForString)
.property("senderWire", makeCodecOptional(codecForString))
.property("bankWithdrawStatusUrl", makeCodecOptional(codecForString))
.build("CreateReserveRequest");
@@ -491,6 +491,18 @@ export interface ExchangeListItem {
paytoUris: string[];
}
+export interface AcceptManualWithdrawalResult {
+ /**
+ * Payto URIs that can be used to fund the withdrawal.
+ */
+ exchangePaytoUris: string[];
+
+ /**
+ * Public key of the newly created reserve.
+ */
+ reservePub: string;
+}
+
export interface ManualWithdrawalDetails {
/**
* Did the user accept the current version of the exchange's