Skip to content

Commit

Permalink
fix: update astar-gas-station.herokuapp.com into official astar api (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
konan-5 authored Sep 16, 2024
1 parent ca1ca81 commit bf5621a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apps/extension/src/ui/hooks/useTip.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ChainId } from "@extension/core"
import { useCallback, useEffect, useMemo, useState } from "react"

import { ChainId } from "@extension/core"

export type TipOptionName = "low" | "medium" | "high"
export type TipOptions = Record<TipOptionName, string>
type TipOptionsResolver = (response: Response, chainId: ChainId) => Promise<TipOptions>
Expand All @@ -23,15 +24,15 @@ const getAstarTipOptions: TipOptionsResolver = async (response) => {
// each gas station has a different response shape
const gasStations: Record<ChainId, GasStationInfo> = {
astar: {
url: "https://astar-gas-station.herokuapp.com/api/astar/gasnow",
url: "https://gas.astar.network/api/gasnow?network=astar",
resolver: getAstarTipOptions,
},
shiden: {
url: "https://astar-gas-station.herokuapp.com/api/shiden/gasnow",
url: "https://gas.astar.network/api/gasnow?network=shiden",
resolver: getAstarTipOptions,
},
shibuya: {
url: "https://astar-gas-station.herokuapp.com/api/shibuya/gasnow",
url: "https://gas.astar.network/api/gasnow?network=shibuya",
resolver: getAstarTipOptions,
},
}
Expand Down

0 comments on commit bf5621a

Please sign in to comment.