Skip to content

Commit 173b67c

Browse files
committed
chore: new quote types
1 parent f0e532a commit 173b67c

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/lib/api.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,31 @@ export async function fetchBalances(): Promise<BalancesResponse> {
6060
})
6161
}
6262

63-
interface QuotePending {
63+
interface QuoteBase {
6464
id: string
6565
bill: string
6666
endorser: string
67+
}
68+
69+
interface QuotePending extends QuoteBase {
6770
submitted: number
6871
suggested_expiration: number
6972
}
70-
interface QuoteAccepted {
71-
id: string
72-
bill: string
73-
endorser: string
74-
ttl: number
73+
interface QuoteOffered extends QuoteBase {
74+
ttl: number,
7575
signatures: unknown[]
7676
}
77-
interface QuoteDeclined {
78-
id: string
79-
bill: string
80-
endorser: string
77+
interface QuoteDenied extends QuoteBase {
78+
tstamp: number
79+
}
80+
interface QuoteAccepted extends QuoteBase {
81+
signatures: unknown[]
82+
}
83+
interface QuoteRejected extends QuoteBase {
84+
tstamp: number
8185
}
8286

83-
export type QuoteInfoReply = QuotePending | QuoteAccepted | QuoteDeclined
87+
export type QuoteInfoReply = QuotePending | QuoteOffered | QuoteDenied | QuoteAccepted | QuoteRejected
8488

8589
export interface QuoteListResponse {
8690
quotes: string[]

0 commit comments

Comments
 (0)