small fixes; update serverless

This commit is contained in:
Cocoahomology
2022-05-16 23:56:25 -03:00
parent a36502846c
commit b9dfbbe50f
3 changed files with 17 additions and 9 deletions

View File

@@ -82,7 +82,7 @@ functions:
peggedchart:
handler: src/getPeggedChart.default
timeout: 60
memorySize: 128
memorySize: 2000
events:
- http:
path: peggedcharts
@@ -93,7 +93,7 @@ functions:
peggeds:
handler: src/getPeggeds.default
timeout: 120
memorySize: 128
memorySize: 2000
events:
- http:
path: peggeds
@@ -101,7 +101,7 @@ functions:
peggedAsset:
handler: src/getPegged.default
timeout: 120
memorySize: 128
memorySize: 2000
events:
- http:
path: pegged/{pegged}
@@ -109,15 +109,23 @@ functions:
peggedchains:
handler: src/getPeggedChains.default
timeout: 60
memorySize: 128
memorySize: 2000
events:
- http:
path: peggedchains
method: get
peggedprices:
handler: src/getPeggedPrices.default
timeout: 60
memorySize: 2000
events:
- http:
path: peggedprices
method: get
storePeggedAssets:
handler: src/storePeggedAssets.default
timeout: 900
memorySize: 256
memorySize: 2000
triggerStorePegged:
handler: src/triggerStorePegged.default
timeout: 900
@@ -126,7 +134,7 @@ functions:
storePeggedPrices:
handler: src/storePeggedPrices.default
timeout: 900
memorySize: 128
memorySize: 1024
fetchCoingeckoData:
handler: src/fetchCoingeckoData.default
timeout: 900

View File

@@ -104,7 +104,9 @@ async function terraMinted() {
const adapter: PeggedIssuanceAdapter = {
terra: {
minted: terraMinted(), // this is currently broken
minted: async () => {
return { peggedUSD: 11278778389 };
}, // terraMinted() is currently broken
unreleased: async () => ({}),
},
ethereum: {

View File

@@ -19,7 +19,6 @@ import {
addToChains,
} from "./utils/normalizeChain";
import { importAdapter } from "./peggedAssets/utils/importAdapter";
import getCurrentPeggedPrice from "./adapters/peggedAssets/prices";
type HistoricalTvls = AWS.DynamoDB.DocumentClient.ItemList | undefined;
type HourlyTvl = AWS.DynamoDB.DocumentClient.AttributeMap | undefined;
@@ -48,7 +47,6 @@ export async function craftProtocolResponse(
const [lastBalancesHourlyRecord, historicalPeggedBalances, module] =
await Promise.all([
getLastRecord(hourlyPeggedBalances(peggedData.id)),
//LOOK AT THIS VVVVV
getHistoricalValues(
(useHourlyData ? hourlyPeggedBalances : dailyPeggedBalances)(
peggedData.id