diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-09-08 19:27:08 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-09-08 19:27:08 +0530 |
commit | b9e43e652e606706a81f39d4f888477580de79b0 (patch) | |
tree | d6840162173a9c97414c3662a7ad43bf7349f1d6 /packages/taler-wallet-core/src/types/dbTypes.ts | |
parent | b063382d25d1ed8572ebe2f52bf54247379300d5 (diff) | |
download | wallet-core-b9e43e652e606706a81f39d4f888477580de79b0.tar.xz |
fix tipping and adjust DB
Diffstat (limited to 'packages/taler-wallet-core/src/types/dbTypes.ts')
-rw-r--r-- | packages/taler-wallet-core/src/types/dbTypes.ts | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/packages/taler-wallet-core/src/types/dbTypes.ts b/packages/taler-wallet-core/src/types/dbTypes.ts index 4e2ba1bb4..3e24f787b 100644 --- a/packages/taler-wallet-core/src/types/dbTypes.ts +++ b/packages/taler-wallet-core/src/types/dbTypes.ts @@ -694,17 +694,28 @@ export interface PlanchetRecord { lastError: TalerErrorDetails | undefined; /** - * Public key of the reserve, this might be a reserve not - * known to the wallet if the planchet is from a tip. + * Public key of the reserve that this planchet + * is being withdrawn from. + * + * Can be the empty string (non-null/undefined for DB indexing) + * if this is a tipping reserve. */ reservePub: string; + denomPubHash: string; + denomPub: string; + blindingKey: string; + withdrawSig: string; + coinEv: string; + coinEvHash: string; + coinValue: AmountJson; + isFromTip: boolean; } @@ -772,6 +783,8 @@ export interface RefreshCoinSource { export interface TipCoinSource { type: CoinSourceType.Tip; + walletTipId: string; + coinIndex: number; } export type CoinSource = WithdrawCoinSource | RefreshCoinSource | TipCoinSource; @@ -950,9 +963,9 @@ export interface TipRecord { /** * The tipped amount. */ - amount: AmountJson; + tipAmountRaw: AmountJson; - totalFees: AmountJson; + tipAmountEffective: AmountJson; /** * Timestamp, the tip can't be picked up anymore after this deadline. @@ -1481,18 +1494,6 @@ export enum WithdrawalSourceType { Reserve = "reserve", } -export interface WithdrawalSourceTip { - type: WithdrawalSourceType.Tip; - tipId: string; -} - -export interface WithdrawalSourceReserve { - type: WithdrawalSourceType.Reserve; - reservePub: string; -} - -export type WithdrawalSource = WithdrawalSourceTip | WithdrawalSourceReserve; - export interface DenominationSelectionInfo { totalCoinValue: AmountJson; totalWithdrawCost: AmountJson; @@ -1524,12 +1525,7 @@ export interface DenomSelectionState { export interface WithdrawalGroupRecord { withdrawalGroupId: string; - /** - * Withdrawal source. Fields that don't apply to the respective - * withdrawal source type must be null (i.e. can't be absent), - * otherwise the IndexedDB indexing won't like us. - */ - source: WithdrawalSource; + reservePub: string; exchangeBaseUrl: string; |