Skip to content

Commit

Permalink
Merge pull request #1 from WilliamWelsh/ww-ts-migrations
Browse files Browse the repository at this point in the history
Ww ts migrations
  • Loading branch information
WilliamWelsh authored May 30, 2022
2 parents 3761241 + 7a14252 commit 5515cd1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
20 changes: 14 additions & 6 deletions src/data/eth-upgrade-articles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
export const dannyArticles = [
interface Article {
title: string
description: string
link: string
}

/** Articles by Danny Ryan (Ethereum Foundation) */
export const dannyArticles: Article[] = [
{
title: "Finalized no. 34",
description: "23 March 2022",
Expand Down Expand Up @@ -26,24 +33,25 @@ export const dannyArticles = [
},
]

export const benArticles = [
/** Articles by Ben Edgington (PegaSys, ConsenSys) */
export const benArticles: Article[] = [
{
title: "What’s New in Eth2 – #88",
title: "What’s New in Eth2 – #92",
description: "6 May 2022",
link: "https://hackmd.io/@benjaminion/eth2_news/https%3A%2F%2Fhackmd.io%2F%40benjaminion%2Fwnie2_220506",
},
{
title: "What’s New in Eth2 – #88",
title: "What’s New in Eth2 – #91",
description: "8 April 2022",
link: "https://hackmd.io/@benjaminion/eth2_news/https%3A%2F%2Fhackmd.io%2F%40benjaminion%2Fwnie2_220408",
},
{
title: "What’s New in Eth2 – #88",
title: "What’s New in Eth2 – #90",
description: "25 March 2022",
link: "https://hackmd.io/@benjaminion/eth2_news/https%3A%2F%2Fhackmd.io%2F%40benjaminion%2Fwnie2_220325",
},
{
title: "What’s New in Eth2 – #88",
title: "What’s New in Eth2 – #89",
description: "11 March 2022",
link: "https://hackmd.io/@benjaminion/eth2_news/https%3A%2F%2Fhackmd.io%2F%40benjaminion%2Fwnie2_220311",
},
Expand Down
2 changes: 1 addition & 1 deletion src/lambda/etherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ const handler = () => {
return lambda(process.env.ETHERSCAN_API_KEY)
}

module.exports = { handler, lambda }
export { handler, lambda }
2 changes: 1 addition & 1 deletion src/lambda/etherscanBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ const handler = () => {
return lambda(process.env.ETHERSCAN_API_KEY)
}

module.exports = { handler, lambda }
export { handler, lambda }
3 changes: 2 additions & 1 deletion src/utils/calculateStakingRewards.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const calculateStakingRewards = (totalAtStake: number) => {
/** Calculates the current APR for the staking reward */
const calculateStakingRewards = (totalAtStake: number): number => {
const slotTimeInSec = 12
const slotsInEpoch = 32
const baseRewardFactor = 64
Expand Down
2 changes: 1 addition & 1 deletion src/utils/flattenMessages.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Messages } from "../interfaces"

// same function from 'gatsby-plugin-intl'
/** same function from 'gatsby-plugin-intl' */
const flattenMessages = (nestedMessages: Messages, prefix = ""): Messages => {
return Object.keys(nestedMessages).reduce<Messages>((messages, key) => {
let value = nestedMessages[key]
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import flattenMessages from "./flattenMessages"
import type { Messages } from "../interfaces"
import type { Lang } from "./languages"

// same function from 'gatsby-plugin-intl'
/** same function from 'gatsby-plugin-intl' */
const getMessages = (path: string, language: Lang): Messages => {
try {
const messages = JSON.parse(
Expand Down

0 comments on commit 5515cd1

Please sign in to comment.