diff --git a/packages/universal-swap/package.json b/packages/universal-swap/package.json index de145a18..39c34314 100644 --- a/packages/universal-swap/package.json +++ b/packages/universal-swap/package.json @@ -1,6 +1,6 @@ { "name": "@oraichain/oraidex-universal-swap", - "version": "1.0.50", + "version": "1.0.51", "main": "build/index.js", "files": [ "build/" diff --git a/packages/universal-swap/src/handler.ts b/packages/universal-swap/src/handler.ts index c68289ba..0f2d926c 100644 --- a/packages/universal-swap/src/handler.ts +++ b/packages/universal-swap/src/handler.ts @@ -615,7 +615,7 @@ export class UniversalSwapHandler { return [msg]; } catch (error) { - throw generateError(`Error generateMsgsSwap: ${error}`); + throw generateError(`Error generateMsgsSwap: ${JSON.stringify(error)}`); } } diff --git a/packages/universal-swap/src/helper.ts b/packages/universal-swap/src/helper.ts index e8b7ddd5..5892b7ef 100644 --- a/packages/universal-swap/src/helper.ts +++ b/packages/universal-swap/src/helper.ts @@ -372,7 +372,7 @@ export const simulateSwap = async (query: { if (!isSimulatingRatio) return data; return { amount: data.amount.substring(0, data.amount.length - 1) }; } catch (error) { - throw new Error(`Error when trying to simulate swap using router v2: ${error}`); + throw new Error(`Error when trying to simulate swap using router v2: ${JSON.stringify(error)}`); } };