Add user avatar URL

This commit is contained in:
2025-05-13 11:31:03 +07:00
parent 4b0e87d48e
commit 621a5a745e
12 changed files with 196 additions and 31 deletions

View File

@@ -459,8 +459,6 @@ export const closeGmxPositionImpl = async (
return position.marketInfo.indexToken.symbol === ticker && position.isLong === (direction === TradeDirection.Long);
});
console.log("positionsInfo", positionsInfo);
if (!positionKey) {
throw new Error(`No open ${direction} position found for ${ticker}`);
}

View File

@@ -4,15 +4,15 @@ import {closeGmxPositionImpl, getClientForAddress} from '../../src/plugins/custo
import {TradeDirection} from '../../src/generated/ManagingApiTypes'
test('GMX Position Closing', async (t) => {
await t.test('should close a long position for BTC', async () => {
const sdk = await getClientForAddress('0x932167388dD9aad41149b3cA23eBD489E2E2DD78')
await t.test('should close a long position for BTC', async () => {
const sdk = await getClientForAddress('0xbBA4eaA534cbD0EcAed5E2fD6036Aec2E7eE309f')
const result = await closeGmxPositionImpl(
sdk,
'BNB',
TradeDirection.Long
)
console.log('Position closing result:', result)
assert.ok(result, 'Position closing result should be defined')
})
const result = await closeGmxPositionImpl(
sdk,
'BNB',
TradeDirection.Long
)
console.log('Position closing result:', result)
assert.ok(result, 'Position closing result should be defined')
})
})