Skip to content

Commit

Permalink
add indexer authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
xieqian committed May 2, 2024
1 parent 6a3ab20 commit 06a4f49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/hooks/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const useRefPrice = () => {
const [data, setData] = useState<RefPrice>();

useEffect(() => {
axios.get<RefPrice>('https://indexer.ref.finance/get-token-price?token_id=token.v2.ref-finance.near').then(res => {
axios.get<RefPrice>('https://api.ref.finance/get-token-price?token_id=token.v2.ref-finance.near').then(res => {
if (res.status === 200) {
setData(res.data);
} else {
Expand Down Expand Up @@ -45,7 +45,7 @@ export const useTokenBaeInfoList = () => {
const [tokenBaseInfMap, setTokenBaseInfMap] = useState<Record<string, TokenBaseInfo>>({});

useEffect(() => {
axios.get<Record<string, TokenBaseInfo>>('https://indexer.ref.finance/list-token').then(res => {
axios.get<Record<string, TokenBaseInfo>>('https://api.ref.finance/list-token').then(res => {
if (res.status === 200) {
setTokenBaseInfMap(res.data);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/v2/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const Navbar = () => {
window.open('https://app.ref.finance/');
}
useEffect(() => {
fetch('https://indexer.ref.finance/get-token-price?token_id=token.v2.ref-finance.near')
fetch('https://api.ref.finance/get-token-price?token_id=token.v2.ref-finance.near')
.then(response => response.json())
.then(data => {
const formattedPrice = Number(data.price).toFixed(2);
Expand Down

0 comments on commit 06a4f49

Please sign in to comment.