-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lit-task-auto-top-up): LIT-2791 - Limit auto-top-up service to l…
…imit number of un-expired NFTs per recipient - Only top-up if a recipient will have 0 un-expired tokens tomorrow
- Loading branch information
1 parent
eff3ae9
commit 1137a04
Showing
4 changed files
with
124 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum TaskResultEnum { | ||
minted = 'minted', | ||
skipped = 'skipped', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
import { ConsolaInstance } from 'consola'; | ||
import { z } from 'zod'; | ||
|
||
import { TaskResultEnum } from './enums'; | ||
import { recipientDetailSchema, envConfigSchema } from './schemas'; | ||
|
||
export type EnvConfig = z.infer<typeof envConfigSchema>; | ||
export type Config = { envConfig: EnvConfig; logger: ConsolaInstance }; | ||
|
||
export type RecipientDetail = z.infer<typeof recipientDetailSchema>; | ||
|
||
export interface TaskResult extends RecipientDetail { | ||
export type TaskResult = TaskResultMinted | TaskResultSkipped; | ||
export interface TaskResultMinted extends RecipientDetail { | ||
capacityTokenIdStr: string; | ||
result: TaskResultEnum.minted; | ||
} | ||
|
||
export interface TaskResultSkipped extends RecipientDetail { | ||
result: TaskResultEnum.skipped; | ||
unexpiredTokens: { | ||
expiresAt: string; | ||
tokenId: number; | ||
}[]; | ||
} |