Skip to content

Commit

Permalink
💚 fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelStark committed Feb 6, 2025
1 parent 0a7052e commit f7fe72c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
14 changes: 14 additions & 0 deletions src/__tests__/bitcoin_mcp.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
describe("Bitcoin MCP", () => {
const _config = {};

beforeEach(() => {});

afterEach(async () => {});

describe("get_latest_block", () => {
it("should get the latest block", async () => {
// TODO: Implement test
expect(true).toBe(true);
});
});
});
File renamed without changes.
12 changes: 6 additions & 6 deletions src/sse_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
McpError,
TextContent,
} from "@modelcontextprotocol/sdk/types.js";
import { BitcoinClient } from "./bitcoin-client.js";
import { BitcoinClient } from "./bitcoin_client.js";
import {
Config,
ConfigSchema,
Expand Down Expand Up @@ -53,7 +53,7 @@ export class BitcoinSseServer implements BitcoinServer {
capabilities: {
tools: {},
},
},
}
);
this.app = express();

Expand Down Expand Up @@ -212,7 +212,7 @@ export class BitcoinSseServer implements BitcoinServer {
default:
throw new McpError(
ErrorCode.MethodNotFound,
`Unknown tool: ${name}`,
`Unknown tool: ${name}`
);
}
} catch (error) {
Expand Down Expand Up @@ -245,7 +245,7 @@ export class BitcoinSseServer implements BitcoinServer {
if (!result.success) {
throw new McpError(
ErrorCode.InvalidParams,
`Invalid parameters: ${result.error.message}`,
`Invalid parameters: ${result.error.message}`
);
}

Expand All @@ -271,7 +271,7 @@ export class BitcoinSseServer implements BitcoinServer {
if (!result.success) {
throw new McpError(
ErrorCode.InvalidParams,
`Invalid parameters: ${result.error.message}`,
`Invalid parameters: ${result.error.message}`
);
}

Expand Down Expand Up @@ -310,7 +310,7 @@ export class BitcoinSseServer implements BitcoinServer {
if (!result.success) {
throw new McpError(
ErrorCode.InvalidParams,
`Invalid parameters: ${result.error.message}`,
`Invalid parameters: ${result.error.message}`
);
}

Expand Down
16 changes: 8 additions & 8 deletions src/stdio_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
McpError,
TextContent,
} from "@modelcontextprotocol/sdk/types.js";
import { BitcoinClient } from "./bitcoin-client.js";
import { BitcoinClient } from "./bitcoin_client.js";
import {
Config,
ConfigSchema,
Expand Down Expand Up @@ -42,7 +42,7 @@ export class BitcoinStdioServer implements BitcoinServer {
const customWrite = function (
str: string | Uint8Array,
encodingOrCb?: BufferEncoding | ((err?: Error) => void),
cb?: (err?: Error) => void,
cb?: (err?: Error) => void
): boolean {
let encoding: BufferEncoding | undefined;
let callback: ((err?: Error) => void) | undefined;
Expand Down Expand Up @@ -73,7 +73,7 @@ export class BitcoinStdioServer implements BitcoinServer {
capabilities: {
tools: {},
},
},
}
);

this.setupHandlers();
Expand Down Expand Up @@ -110,7 +110,7 @@ export class BitcoinStdioServer implements BitcoinServer {
try {
// Restore original stdout
process.stdout.write = this.originalStdout.write.bind(
this.originalStdout,
this.originalStdout
);
await this.server.close();
logger.info("Server shutdown complete");
Expand Down Expand Up @@ -206,7 +206,7 @@ export class BitcoinStdioServer implements BitcoinServer {
default:
throw new McpError(
ErrorCode.MethodNotFound,
`Unknown tool: ${name}`,
`Unknown tool: ${name}`
);
}
} catch (error) {
Expand All @@ -232,7 +232,7 @@ export class BitcoinStdioServer implements BitcoinServer {
if (!result.success) {
throw new McpError(
ErrorCode.InvalidParams,
`Invalid parameters: ${result.error.message}`,
`Invalid parameters: ${result.error.message}`
);
}

Expand All @@ -254,7 +254,7 @@ export class BitcoinStdioServer implements BitcoinServer {
if (!result.success) {
throw new McpError(
ErrorCode.InvalidParams,
`Invalid parameters: ${result.error.message}`,
`Invalid parameters: ${result.error.message}`
);
}

Expand Down Expand Up @@ -286,7 +286,7 @@ export class BitcoinStdioServer implements BitcoinServer {
if (!result.success) {
throw new McpError(
ErrorCode.InvalidParams,
`Invalid parameters: ${result.error.message}`,
`Invalid parameters: ${result.error.message}`
);
}

Expand Down

0 comments on commit f7fe72c

Please sign in to comment.