aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src/wallet-types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-util/src/wallet-types.ts')
-rw-r--r--packages/taler-util/src/wallet-types.ts17
1 files changed, 15 insertions, 2 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index 346528029..ba6f53cca 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -374,19 +374,31 @@ export const codecForAmountResponse = (): Codec<AmountResponse> =>
.property("rawAmount", codecForAmountString())
.build("AmountResponse");
+export enum BalanceFlag {
+ IncomingKyc = "incoming-kyc",
+ IncomingAml = "incoming-aml",
+ IncomingConfirmation = "incoming-confirmation",
+ OutgoingKyc = "outgoing-kyc",
+}
export interface WalletBalance {
scopeInfo: ScopeInfo;
available: AmountString;
pendingIncoming: AmountString;
pendingOutgoing: AmountString;
- // Does the balance for this currency have a pending
- // transaction?
+ /**
+ * Does the balance for this currency have a pending
+ * transaction?
+ *
+ * FIXME: Represent as a flag!
+ */
hasPendingTransactions: boolean;
// Is there a pending transaction that would affect the balance
// and requires user input?
requiresUserInput: boolean;
+
+ flags: BalanceFlag[];
}
export const codecForScopeInfoGlobal = (): Codec<ScopeInfoGlobal> =>
@@ -481,6 +493,7 @@ export const codecForBalance = (): Codec<WalletBalance> =>
.property("pendingIncoming", codecForAmountString())
.property("pendingOutgoing", codecForAmountString())
.property("requiresUserInput", codecForBoolean())
+ .property("flags", codecForAny()) // FIXME
.build("Balance");
export const codecForBalancesResponse = (): Codec<BalancesResponse> =>