diff --git a/packages/explorerkit-server/src/components/decoders/errors.spec.ts b/packages/explorerkit-server/src/components/decoders/errors.spec.ts index f22fd0d..7e7c870 100644 --- a/packages/explorerkit-server/src/components/decoders/errors.spec.ts +++ b/packages/explorerkit-server/src/components/decoders/errors.spec.ts @@ -33,7 +33,7 @@ describe("errors", () => { expect(result).toEqual({ decodedMessage: "Slippage tolerance exceeded", errorCode: 6001, - name: "SlippageToleranceExceeded", + kind: "SlippageToleranceExceeded", programId: "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4", }); }); diff --git a/packages/explorerkit-server/src/components/decoders/errors.ts b/packages/explorerkit-server/src/components/decoders/errors.ts index f124348..944d998 100644 --- a/packages/explorerkit-server/src/components/decoders/errors.ts +++ b/packages/explorerkit-server/src/components/decoders/errors.ts @@ -26,6 +26,6 @@ export function decodeProgramError(idls: IdlsMap, programError: ProgramError): P return { ...programError, decodedMessage: parsedError.data, - name: parsedError.name, + kind: parsedError.name, }; } diff --git a/packages/explorerkit-server/src/server.test.ts b/packages/explorerkit-server/src/server.test.ts index 823e220..d8939db 100644 --- a/packages/explorerkit-server/src/server.test.ts +++ b/packages/explorerkit-server/src/server.test.ts @@ -910,14 +910,14 @@ describe("Server API Tests", () => { { decodedMessage: "Slippage tolerance exceeded", errorCode: 6001, - name: "SlippageToleranceExceeded", + kind: "SlippageToleranceExceeded", programId: "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4", }, null, { decodedMessage: "Invalid calculation", errorCode: 6002, - name: "InvalidCalculation", + kind: "InvalidCalculation", programId: "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4", }, { diff --git a/packages/explorerkit-server/src/types.ts b/packages/explorerkit-server/src/types.ts index c807c97..82cc847 100644 --- a/packages/explorerkit-server/src/types.ts +++ b/packages/explorerkit-server/src/types.ts @@ -15,7 +15,7 @@ export interface ProgramError { programId: string; errorCode?: number | null; decodedMessage?: string; - name?: string | null; + kind?: string | null; } export interface Account {