Skip to content

Commit

Permalink
fix(trader): correct merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Mar 3, 2021
1 parent 28c19ae commit 989af49
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions src/trader.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,25 +417,10 @@ socket.on("sell_signal", async (signal) => {
}

if (tradingData.user_payload[tresult].trading_type === "real") {
bnb_client.mgBorrow(
alt,
Number(qty),
(error, response) => {
if (error) {
console.log(
"ERROR 55555555555",
alt,
Number(qty),
JSON.stringify(error)
)
return
}

console.log(
"SUCESS 444444444 mgMarketSell 44444444"
)
bnb_client.mgMarketSell(
alt + "BTC",
const job = async () => {
return new Promise((resolve, reject) => {
bnb_client.mgBorrow(
alt,
Number(qty),
(error, response) => {
if (error) {
Expand All @@ -445,7 +430,6 @@ socket.on("sell_signal", async (signal) => {
Number(qty),
JSON.stringify(error)
)

reject(error)
return
}
Expand Down Expand Up @@ -486,8 +470,8 @@ socket.on("sell_signal", async (signal) => {
)
}
)
}
)
})
}

const task = new Task(job)
tradeQueue.addToQueue(task)
Expand Down

0 comments on commit 989af49

Please sign in to comment.