Update bot workflow
This commit is contained in:
@@ -1228,7 +1228,7 @@ public class GmxV2Service
|
||||
{
|
||||
var position = await GetGmxPositionsV2(web3, publicAddress);
|
||||
var positionsPerTicker =
|
||||
position.First(p => GmxV2Helpers.SameAddress(p.MarketAddress, GmxV2Helpers.GetMarketAddress(ticker)));
|
||||
position.First(p => GmxV2Helpers.SameAddress(p.Key, publicAddress));
|
||||
|
||||
return GmxV2Mappers.Map(positionsPerTicker, ticker);
|
||||
}
|
||||
@@ -1375,6 +1375,7 @@ public class GmxV2Service
|
||||
|
||||
public async Task<decimal> QuantityInPosition(Web3 web3, string publicAddress, Enums.Ticker ticker)
|
||||
{
|
||||
return (await GetTrade(web3, publicAddress, ticker)).Status == Enums.TradeStatus.Filled ? 1 : 0;
|
||||
var trade = await GetTrade(web3, publicAddress, ticker);
|
||||
return trade.Status == Enums.TradeStatus.Filled ? trade.Quantity : 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user