Track txnId and successful users
This commit is contained in:
parent
12aceef4ca
commit
76d234388b
|
@ -16,6 +16,8 @@ export type Manalink = {
|
|||
// If set to Infinity, the link can be used infinitely
|
||||
maxUses: number
|
||||
|
||||
// Used for simpler caching
|
||||
successUserIds: string[]
|
||||
// Successful redemptions of the link
|
||||
successes: Claim[]
|
||||
// Failed redemptions of the link
|
||||
|
@ -25,5 +27,8 @@ export type Manalink = {
|
|||
type Claim = {
|
||||
toId: string
|
||||
|
||||
// The ID of the successful txn that tracks the money moved
|
||||
txnId: string
|
||||
|
||||
claimedTime: number
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ export async function createManalink(data: {
|
|||
createdTime: Date.now(),
|
||||
expiresTime,
|
||||
maxUses,
|
||||
successUserIds: [],
|
||||
successes: [],
|
||||
failures: [],
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user