Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ngundotra committed Oct 15, 2024
1 parent 39009f6 commit a9ee3cc
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions app/utils/programs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ export enum PROGRAM_NAMES {
FINTERNET_TOKEN_MANAGER = 'Finternet - Token manager',

// ZK Compression
ZK_LIGHT_SYSTEM_PROGRAM = "Light System Program",
ZK_COMPRESSED_TOKEN_PROGRAM = "ZK Compressed Token Program",
ZK_ACCOUNT_COMPRESSION_PROGRAM = "ZK Account Compression Program"
ZK_LIGHT_SYSTEM_PROGRAM = 'Light System Program',
ZK_COMPRESSED_TOKEN_PROGRAM = 'ZK Compressed Token Program',
ZK_ACCOUNT_COMPRESSION_PROGRAM = 'ZK Account Compression Program',
}

const ALL_CLUSTERS = [Cluster.Custom, Cluster.Devnet, Cluster.Testnet, Cluster.MainnetBeta];
Expand Down Expand Up @@ -356,6 +356,10 @@ export const PROGRAM_INFO_BY_ID: { [address: string]: ProgramInfo } = {
deployments: LIVE_CLUSTERS,
name: PROGRAM_NAMES.SWAP,
},
SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7: {
deployments: [Cluster.MainnetBeta, Cluster.Devnet],
name: PROGRAM_NAMES.ZK_LIGHT_SYSTEM_PROGRAM,
},
TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA: {
deployments: ALL_CLUSTERS,
name: PROGRAM_NAMES.TOKEN,
Expand Down Expand Up @@ -384,6 +388,10 @@ export const PROGRAM_INFO_BY_ID: { [address: string]: ProgramInfo } = {
deployments: LIVE_CLUSTERS,
name: PROGRAM_NAMES.NFT_AUCTION,
},
cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m: {
deployments: [Cluster.MainnetBeta, Cluster.Devnet],
name: PROGRAM_NAMES.ZK_COMPRESSED_TOKEN_PROGRAM,
},
cjg3oHmg9uuPsP8D6g29NWvhySJkdYdAo9D25PRbKXJ: {
deployments: [Cluster.Devnet, Cluster.MainnetBeta],
name: PROGRAM_NAMES.CHAINLINK_ORACLE,
Expand All @@ -400,6 +408,10 @@ export const PROGRAM_INFO_BY_ID: { [address: string]: ProgramInfo } = {
deployments: LIVE_CLUSTERS,
name: PROGRAM_NAMES.NFT_CANDY_MACHINE,
},
compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq: {
deployments: [Cluster.MainnetBeta, Cluster.Devnet],
name: PROGRAM_NAMES.ZK_ACCOUNT_COMPRESSION_PROGRAM,
},
gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s: {
deployments: [Cluster.Devnet],
name: PROGRAM_NAMES.PYTH_DEVNET,
Expand All @@ -418,7 +430,7 @@ export const PROGRAM_INFO_BY_ID: { [address: string]: ProgramInfo } = {
},
oreV2ZymfyeXgNgBdqMkumTqqAprVqgBWQfoYkrtKWQ: {
deployments: [Cluster.MainnetBeta],
name: PROGRAM_NAMES.ORE
name: PROGRAM_NAMES.ORE,
},
p1exdMJcjVao65QdewkaZRUnU6VPSXhus9n2GzWfh98: {
deployments: LIVE_CLUSTERS,
Expand All @@ -440,18 +452,6 @@ export const PROGRAM_INFO_BY_ID: { [address: string]: ProgramInfo } = {
deployments: [Cluster.MainnetBeta],
name: PROGRAM_NAMES.WORMHOLE_TOKEN,
},
SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7: {
deployments: [Cluster.MainnetBeta, Cluster.Devnet],
name: PROGRAM_NAMES.ZK_LIGHT_SYSTEM_PROGRAM,
},
cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m: {
deployments: [Cluster.MainnetBeta, Cluster.Devnet],
name: PROGRAM_NAMES.ZK_COMPRESSED_TOKEN_PROGRAM,
},
compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq: {
deployments: [Cluster.MainnetBeta, Cluster.Devnet],
name: PROGRAM_NAMES.ZK_ACCOUNT_COMPRESSION_PROGRAM,
},
};

export const SPECIAL_IDS: { [key: string]: string } = {
Expand Down Expand Up @@ -479,7 +479,8 @@ export const TOKEN_IDS: { [key: string]: string } = {

export type TokenProgram = 'spl-token' | 'spl-token-2022';
export function assertIsTokenProgram(program: string): asserts program is TokenProgram {
if (program !== 'spl-token' && program !== 'spl-token-2022') throw new Error("Expected token program name of `spl-token` or `spl-token-2022`");
if (program !== 'spl-token' && program !== 'spl-token-2022')
throw new Error('Expected token program name of `spl-token` or `spl-token-2022`');
}
export function isTokenProgram(program: string): program is TokenProgram {
try {
Expand Down

0 comments on commit a9ee3cc

Please sign in to comment.