aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/db.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-08-24 22:42:30 +0200
committerFlorian Dold <florian@dold.me>2022-08-24 22:42:30 +0200
commitf3231ccdf9a2ce944bdc039fa8351117d18c3fe3 (patch)
tree09526df32c6c234eb9cfcc85ee6221c3f36a12f2 /packages/taler-wallet-core/src/db.ts
parenta11ac57535b0375f152ce115ee541cb8aca98e84 (diff)
downloadwallet-core-f3231ccdf9a2ce944bdc039fa8351117d18c3fe3.tar.xz
wallet-core: put taler:// URIs in transactions list
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r--packages/taler-wallet-core/src/db.ts41
1 files changed, 34 insertions, 7 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
index e6b4854db..40f4ea2b5 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -1226,6 +1226,39 @@ export const enum WithdrawalRecordType {
PeerPushCredit = "peer-push-credit",
}
+export interface WgInfoBankIntegrated {
+ withdrawalType: WithdrawalRecordType.BankIntegrated;
+ /**
+ * Extra state for when this is a withdrawal involving
+ * a Taler-integrated bank.
+ */
+ bankInfo: ReserveBankInfo;
+}
+
+export interface WgInfoBankManual {
+ withdrawalType: WithdrawalRecordType.BankManual;
+}
+
+export interface WgInfoBankPeerPull {
+ withdrawalType: WithdrawalRecordType.PeerPullCredit;
+
+ /**
+ * Needed to quickly construct the taler:// URI for the counterparty
+ * without a join.
+ */
+ contractPriv: string;
+}
+
+export interface WgInfoBankPeerPush {
+ withdrawalType: WithdrawalRecordType.PeerPushCredit;
+}
+
+export type WgInfo =
+ | WgInfoBankIntegrated
+ | WgInfoBankManual
+ | WgInfoBankPeerPull
+ | WgInfoBankPeerPush;
+
/**
* Group of withdrawal operations that need to be executed.
* (Either for a normal withdrawal or from a tip.)
@@ -1239,7 +1272,7 @@ export interface WithdrawalGroupRecord {
*/
withdrawalGroupId: string;
- withdrawalType: WithdrawalRecordType;
+ wgInfo: WgInfo;
/**
* Secret seed used to derive planchets.
@@ -1302,12 +1335,6 @@ export interface WithdrawalGroupRecord {
restrictAge?: number;
/**
- * Extra state for when this is a withdrawal involving
- * a Taler-integrated bank.
- */
- bankInfo?: ReserveBankInfo;
-
- /**
* Amount including fees (i.e. the amount subtracted from the
* reserve to withdraw all coins in this withdrawal session).
*/