diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-09-04 02:20:20 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-09-04 02:20:20 +0530 |
commit | 9ec6018efef9b45ee42ccda33ed7093881534141 (patch) | |
tree | 3b7b0a8bb78cb959531f965152c8307607a05d92 /packages/taler-wallet-core/src/types | |
parent | 54c0d1c2589951be26a83575b77dbb80f3a08b79 (diff) | |
download | wallet-core-9ec6018efef9b45ee42ccda33ed7093881534141.tar.xz |
test recoup, fix bug in reserve state machine, fix bug in recoup-refresh
Diffstat (limited to 'packages/taler-wallet-core/src/types')
-rw-r--r-- | packages/taler-wallet-core/src/types/dbTypes.ts | 6 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/types/notifications.ts | 2 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/types/walletTypes.ts | 33 |
3 files changed, 41 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/types/dbTypes.ts b/packages/taler-wallet-core/src/types/dbTypes.ts index 30a562822..45c19cbd0 100644 --- a/packages/taler-wallet-core/src/types/dbTypes.ts +++ b/packages/taler-wallet-core/src/types/dbTypes.ts @@ -321,6 +321,12 @@ export interface ReserveRecord { reserveStatus: ReserveRecordStatus; /** + * Was a reserve query requested? If so, query again instead + * of going into dormant status. + */ + requestedQuery: boolean; + + /** * Time of the last successful status query. */ lastSuccessfulStatusQuery: Timestamp | undefined; diff --git a/packages/taler-wallet-core/src/types/notifications.ts b/packages/taler-wallet-core/src/types/notifications.ts index 7d3795a6d..7a51f0d83 100644 --- a/packages/taler-wallet-core/src/types/notifications.ts +++ b/packages/taler-wallet-core/src/types/notifications.ts @@ -24,6 +24,7 @@ */ import { TalerErrorDetails } from "./walletTypes"; import { WithdrawalSource } from "./dbTypes"; +import { ReserveHistorySummary } from "../util/reserveHistoryUtil"; export enum NotificationType { CoinWithdrawn = "coin-withdrawn", @@ -126,6 +127,7 @@ export interface RefreshRefusedNotification { export interface ReserveUpdatedNotification { type: NotificationType.ReserveUpdated; + updateSummary?: ReserveHistorySummary; } export interface ReserveConfirmedNotification { diff --git a/packages/taler-wallet-core/src/types/walletTypes.ts b/packages/taler-wallet-core/src/types/walletTypes.ts index 5686ee61c..82f29c39d 100644 --- a/packages/taler-wallet-core/src/types/walletTypes.ts +++ b/packages/taler-wallet-core/src/types/walletTypes.ts @@ -691,6 +691,17 @@ export const codecForAddExchangeRequest = (): Codec<AddExchangeRequest> => .property("exchangeBaseUrl", codecForString()) .build("AddExchangeRequest"); +export interface ForceExchangeUpdateRequest { + exchangeBaseUrl: string; +} + +export const codecForForceExchangeUpdateRequest = (): Codec< + AddExchangeRequest +> => + buildCodecForObject<AddExchangeRequest>() + .property("exchangeBaseUrl", codecForString()) + .build("AddExchangeRequest"); + export interface GetExchangeTosRequest { exchangeBaseUrl: string; } @@ -870,3 +881,25 @@ export const codecForApplyRefundResponse = (): Codec<ApplyRefundResponse> => .property("pendingAtExchange", codecForBoolean()) .property("proposalId", codecForString()) .build("ApplyRefundResponse"); + +export interface SetCoinSuspendedRequest { + coinPub: string; + suspended: boolean; +} + +export const codecForSetCoinSuspendedRequest = (): Codec< + SetCoinSuspendedRequest +> => + buildCodecForObject<SetCoinSuspendedRequest>() + .property("coinPub", codecForString()) + .property("suspended", codecForBoolean()) + .build("SetCoinSuspendedRequest"); + +export interface ForceRefreshRequest { + coinPubList: string[]; +} + +export const codecForForceRefreshRequest = (): Codec<ForceRefreshRequest> => + buildCodecForObject<ForceRefreshRequest>() + .property("coinPubList", codecForList(codecForString())) + .build("ForceRefreshRequest"); |