Skip to content

Commit

Permalink
Temporarily remove program errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lorisleiva committed Dec 11, 2023
1 parent 94b2c53 commit f1922ef
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 141 deletions.
9 changes: 0 additions & 9 deletions clients/js/src/generated/errors/index.ts

This file was deleted.

115 changes: 0 additions & 115 deletions clients/js/src/generated/errors/splSystem.ts

This file was deleted.

1 change: 0 additions & 1 deletion clients/js/src/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

export * from './accounts';
export * from './errors';
export * from './instructions';
export * from './programs';
export * from './shared';
18 changes: 2 additions & 16 deletions clients/js/src/generated/programs/splSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,17 @@
*/

import { Address } from '@solana/addresses';
import {
SplSystemProgramError,
SplSystemProgramErrorCode,
getSplSystemProgramErrorFromCode,
} from '../errors';
import {
Context,
Program,
ProgramWithErrors,
getProgramAddress,
} from '../shared';
import { Context, Program, getProgramAddress } from '../shared';

export const SPL_SYSTEM_PROGRAM_ADDRESS =
'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;

export type SplSystemProgram = Program<'11111111111111111111111111111111'> &
ProgramWithErrors<SplSystemProgramErrorCode, SplSystemProgramError>;
export type SplSystemProgram = Program<'11111111111111111111111111111111'>;

export function createSplSystemProgram(): SplSystemProgram {
return {
name: 'splSystem',
address: SPL_SYSTEM_PROGRAM_ADDRESS,
getErrorFromCode(code: SplSystemProgramErrorCode, cause?: Error) {
return getSplSystemProgramErrorFromCode(code, cause);
},
};
}

Expand Down
10 changes: 10 additions & 0 deletions configs/kinobi.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ kinobi.update(
})
);

// Temporarily remove program errors.
kinobi.update(
new k.TransformNodesVisitor([
{
selector: { kind: "programNode" },
transformer: (programNode) => ({ ...programNode, errors: [] }),
},
])
);

// Update accounts.
kinobi.update(
new k.UpdateAccountsVisitor({
Expand Down

0 comments on commit f1922ef

Please sign in to comment.