Add user avatar URL
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user