Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
olivbau committed Dec 20, 2024
1 parent 4f64109 commit 54551b9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/jobs/jupiterJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ import { Token, JobFct, Job } from '../types';
import { constTokensMap } from '../tokens/constTokens';
import { getKey } from '../helpers/getKey';

type JupToken = {
address: string;
created_at: Date;
daily_volume: number;
decimals: number;
freeze_authority: null | string;
logoURI: null | string;
mint_authority: null | string;
minted_at: Date | null;
name: string;
permanent_delegate: null | string;
symbol: string;
};
async function getJupTokens() {
const res = await axios.get('https://tokens.jup.ag/tokens', {
timeout: 240000,
Expand All @@ -14,7 +27,7 @@ async function getJupTokens() {
}

const jobFct: JobFct = async () => {
const jupTokens = await getJupTokens();
const jupTokens: JupToken[] = await getJupTokens();
const tokens = new Map<string, Token>();
for (let i = 0; i < jupTokens.length; i += 1) {
const jupToken = jupTokens[i];
Expand Down

0 comments on commit 54551b9

Please sign in to comment.