MCPcopy Index your code
hub / github.com/massCodeIO/massCode / createPayload

Function createPayload

src/main/currencyRates.ts:55–61  ·  view source on GitHub ↗
(rates: Record<string, number>)

Source from the content-addressed store, hash-verified

53}
54
55function createPayload(rates: Record<string, number>): CurrencyRatesPayload {
56 return {
57 rates: normalizeRates(rates),
58 fetchedAt: Date.now(),
59 source: 'live',
60 }
61}
62
63async function fetchFiatRates(): Promise<Record<string, number>> {
64 const response = await fetch('https://open.er-api.com/v6/latest/USD')

Callers 3

getCurrencyRatesFunction · 0.85
refreshFiatRatesForcedFunction · 0.85
refreshCryptoRatesForcedFunction · 0.85

Calls 1

normalizeRatesFunction · 0.85

Tested by

no test coverage detected