tsc & prettier

This commit is contained in:
Filip Dunder
2024-04-30 10:52:42 -03:00
parent 04e5ca7d27
commit 77c9853562
55 changed files with 2842 additions and 790 deletions

View File

@ -1,23 +1,23 @@
import { Token } from '@raydium-io/raydium-sdk';
import { TOKEN_PROGRAM_ID } from '@solana/spl-token';
import { PublicKey } from '@solana/web3.js';
import { Token } from "@raydium-io/raydium-sdk";
import { TOKEN_PROGRAM_ID } from "@solana/spl-token";
import { PublicKey } from "@solana/web3.js";
export function getToken(token: string) {
switch (token) {
case 'WSOL': {
return Token.WSOL;
}
case 'USDC': {
return new Token(
TOKEN_PROGRAM_ID,
new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'),
6,
'USDC',
'USDC',
);
}
default: {
throw new Error(`Unsupported quote mint "${token}". Supported values are USDC and WSOL`);
}
}
switch (token) {
case "WSOL": {
return Token.WSOL;
}
case "USDC": {
return new Token(
TOKEN_PROGRAM_ID,
new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"),
6,
"USDC",
"USDC",
);
}
default: {
throw new Error(`Unsupported quote mint "${token}". Supported values are USDC and WSOL`);
}
}
}