@runesx/api-client 0.5.3 → 0.5.4

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/package.json +1 -1
  2. package/src/api.mjs +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runesx/api-client",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "A Node.js client for interacting with the RunesX platform API and WebSocket",
5
5
  "main": "src/index.mjs",
6
6
  "type": "module",
package/src/api.mjs CHANGED
@@ -181,7 +181,8 @@ export function createApi(config) {
181
181
  async function postSwap({ amountIn, path, minAmountOut, idempotencyKey }) {
182
182
  try {
183
183
  const key = idempotencyKey || randomUUID();
184
- const response = await api.post('/swap', { amountIn, path, minAmountOut }, {
184
+ const cleanPath = path.map(({ from, to }) => ({ from, to }));
185
+ const response = await api.post('/swap', { amountIn, path: cleanPath, minAmountOut }, {
185
186
  headers: { 'X-Idempotency-Key': key },
186
187
  });
187
188
  return response.data;