From 4e20ab9ef47f08817647e06b3391beec0b3b2331 Mon Sep 17 00:00:00 2001 From: AbhilashG12 Date: Mon, 15 Jun 2026 14:00:16 +0530 Subject: [PATCH] fix(baozi): correct error code mappings from current IDL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Baozi Solana program was upgraded and error codes were renumbered. Changes: - BettingClosed: 6018 → 6013 - BettingFrozen: 6040 → 6014 - BetTooLow: 6020 → 6023 - BetTooHigh: 6041 → 6024 These mappings now match the current on-chain program. Added IDL version comment for future reference. Fixes #1077 --- core/src/exchanges/baozi/errors.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/exchanges/baozi/errors.ts b/core/src/exchanges/baozi/errors.ts index 15b1bc09..106c411a 100644 --- a/core/src/exchanges/baozi/errors.ts +++ b/core/src/exchanges/baozi/errors.ts @@ -12,11 +12,11 @@ import { const PROGRAM_ERRORS: Record = { 6000: { type: 'bad_request', message: 'Unauthorized' }, 6001: { type: 'bad_request', message: 'Market not found' }, + 6013: { type: 'bad_request', message: 'Betting is closed' }, // Changed from 6018 + 6014: { type: 'bad_request', message: 'Betting is frozen' }, // Changed from 6040 6015: { type: 'bad_request', message: 'Market is not open for betting' }, - 6018: { type: 'bad_request', message: 'Betting is closed' }, - 6020: { type: 'invalid_order', message: 'Bet amount too small' }, - 6040: { type: 'bad_request', message: 'Betting is frozen' }, - 6041: { type: 'invalid_order', message: 'Bet amount too large' }, + 6023: { type: 'invalid_order', message: 'Bet amount too small' }, // Changed from 6020 + 6024: { type: 'invalid_order', message: 'Bet amount too large' }, // Changed from 6041 }; /**