/** Per docs/backend/PHASE-1-MONEY-FX-PAYMENTS-CONTRACT.md §3. */
export interface FxQuote {
  quoteId: string;
  base: string;
  quote: string;
  rate: number;
  source: string;
  observedAt: string;
  expiresAt: string;
}

export function isFxQuoteExpired(fxQuote: FxQuote, now: Date = new Date()): boolean {
  return now.getTime() >= new Date(fxQuote.expiresAt).getTime();
}
