@ex-master/core
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -93,4 +93,4 @@ "use strict"; | ||
for (let { market, type, size, value, filledSize, filledValue, paidFee, } of this.activeOrderMap.values()) { | ||
let money = this.getBalance(market.money); | ||
let stock = this.getBalance(market.stock); | ||
let money = balanceMap.get(market.money); | ||
let stock = balanceMap.get(market.stock); | ||
if (type === 'bid') { | ||
@@ -104,4 +104,2 @@ money.frozen = money.frozen.add(value.sub(filledValue)); | ||
} | ||
balanceMap.set(market.money, money); | ||
balanceMap.set(market.stock, stock); | ||
if (paidFee) { | ||
@@ -108,0 +106,0 @@ let fee = this.getBalance(paidFee.key); |
{ | ||
"name": "@ex-master/core", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"main": "bld/library/index.js", | ||
@@ -29,3 +29,3 @@ "types": "bld/library/index.d.ts", | ||
}, | ||
"gitHead": "1316aaf9169931e8399f07cb20f774ab344e759f" | ||
"gitHead": "38dfa1ef28a21f2b5a410ae2054cdae7cb4454a4" | ||
} |
@@ -156,4 +156,4 @@ import Decimal from 'decimal.js'; | ||
} of this.activeOrderMap.values()) { | ||
let money = this.getBalance(market.money); | ||
let stock = this.getBalance(market.stock); | ||
let money = balanceMap.get(market.money)!; | ||
let stock = balanceMap.get(market.stock)!; | ||
@@ -168,5 +168,2 @@ if (type === 'bid') { | ||
balanceMap.set(market.money, money); | ||
balanceMap.set(market.stock, stock); | ||
if (paidFee) { | ||
@@ -173,0 +170,0 @@ let fee = this.getBalance(paidFee.key); |
Sorry, the diff of this file is not supported yet
121803
2501