[FIX] asset-swapper liquidity breakdown (#2472)
* changed divided * added changelog * prettier Co-authored-by: Jacob Evans <dekz@dekz.net>
This commit is contained in:
parent
4a62e80967
commit
befc22d718
@ -2,6 +2,10 @@
|
|||||||
{
|
{
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Fix bug with liquidity source breakdown",
|
||||||
|
"pr": 2472
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"note": "Prune orders before creating a dummy order for the Sampler",
|
"note": "Prune orders before creating a dummy order for the Sampler",
|
||||||
"pr": 2470
|
"pr": 2470
|
||||||
|
@ -426,7 +426,9 @@ export class SwapQuoteCalculator {
|
|||||||
return {
|
return {
|
||||||
...acc,
|
...acc,
|
||||||
...{
|
...{
|
||||||
[source]: (!!acc[source] ? acc[source].plus(assetAmount) : assetAmount).dividedBy(totalAssetAmount),
|
[source]: !!acc[source]
|
||||||
|
? acc[source].plus(assetAmount.dividedBy(totalAssetAmount))
|
||||||
|
: assetAmount.dividedBy(totalAssetAmount),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}, breakdown);
|
}, breakdown);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user