aboutsummaryrefslogtreecommitdiff
path: root/src/types/walletTypes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/types/walletTypes.ts')
-rw-r--r--src/types/walletTypes.ts52
1 files changed, 15 insertions, 37 deletions
diff --git a/src/types/walletTypes.ts b/src/types/walletTypes.ts
index d68f41564..f37815333 100644
--- a/src/types/walletTypes.ts
+++ b/src/types/walletTypes.ts
@@ -146,48 +146,26 @@ export interface ExchangeWithdrawDetails {
walletVersion: string;
}
-/**
- * Mapping from currency/exchange to detailed balance
- * information.
- */
-export interface WalletBalance {
- /**
- * Mapping from currency name to detailed balance info.
- */
- byExchange: { [exchangeBaseUrl: string]: WalletBalanceEntry };
- /**
- * Mapping from currency name to detailed balance info.
- */
- byCurrency: { [currency: string]: WalletBalanceEntry };
-}
+export interface Balance {
+ available: AmountString;
+ pendingIncoming: AmountString;
+ pendingOutgoing: AmountString;
-/**
- * Detailed wallet balance for a particular currency.
- */
-export interface WalletBalanceEntry {
- /**
- * Directly available amount.
- */
- available: AmountJson;
- /**
- * Amount that we're waiting for (refresh, withdrawal).
- */
- pendingIncoming: AmountJson;
- /**
- * Amount that's marked for a pending payment.
- */
- pendingPayment: AmountJson;
- /**
- * Amount that was paid back and we could withdraw again.
- */
- paybackAmount: AmountJson;
+ // Does the balance for this currency have a pending
+ // transaction?
+ hasPendingTransactions: boolean;
- pendingIncomingWithdraw: AmountJson;
- pendingIncomingRefresh: AmountJson;
- pendingIncomingDirty: AmountJson;
+ // Is there a pending transaction that would affect the balance
+ // and requires user input?
+ requiresUserInput: boolean;
}
+export interface BalancesResponse {
+ balances: Balance[];
+}
+
+
/**
* For terseness.
*/