kill-switch-mcp 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/server.js +9 -24
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -4059,6 +4059,7 @@ async function ensureTempoSetup() {
4059
4059
  };
4060
4060
  }
4061
4061
  async function joinTournament(tournamentAddress, username) {
4062
+ username = username.toLowerCase();
4062
4063
  const wallet = await readTempoWallet();
4063
4064
  if (!wallet?.key) {
4064
4065
  throw new Error("No Tempo wallet found. Run setup_game_wallet first.");
@@ -4098,30 +4099,14 @@ async function joinTournament(tournamentAddress, username) {
4098
4099
  }
4099
4100
  const keyAuth = readKeyAuthorization();
4100
4101
  const sponsorOpts = feePayerUrl ? { feePayer: true } : {};
4101
- let approveHash;
4102
- try {
4103
- approveHash = await walletClient.writeContract({
4104
- address: USDC_ADDRESS,
4105
- abi: ERC20_ABI,
4106
- functionName: "approve",
4107
- args: [tournamentAddress, buyIn],
4108
- ...sponsorOpts
4109
- });
4110
- } catch (e) {
4111
- if (keyAuth && e.message?.includes("KeyNotFound")) {
4112
- approveHash = await walletClient.writeContract({
4113
- address: USDC_ADDRESS,
4114
- abi: ERC20_ABI,
4115
- functionName: "approve",
4116
- args: [tournamentAddress, buyIn],
4117
- keyAuthorization: keyAuth,
4118
- gas: 700000n,
4119
- ...sponsorOpts
4120
- });
4121
- } else {
4122
- throw e;
4123
- }
4124
- }
4102
+ const approveHash = await walletClient.writeContract({
4103
+ address: USDC_ADDRESS,
4104
+ abi: ERC20_ABI,
4105
+ functionName: "approve",
4106
+ args: [tournamentAddress, buyIn],
4107
+ ...keyAuth ? { keyAuthorization: keyAuth, gas: 700000n } : {},
4108
+ ...sponsorOpts
4109
+ });
4125
4110
  await pub.waitForTransactionReceipt({ hash: approveHash });
4126
4111
  const depositHash = await walletClient.writeContract({
4127
4112
  address: tournamentAddress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kill-switch-mcp",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Kill Switch MCP Server — AI battle royale powered by Claude Code",
5
5
  "type": "module",
6
6
  "bin": {