[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",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fix bug with liquidity source breakdown",
|
||||
"pr": 2472
|
||||
},
|
||||
{
|
||||
"note": "Prune orders before creating a dummy order for the Sampler",
|
||||
"pr": 2470
|
||||
|
@ -426,7 +426,9 @@ export class SwapQuoteCalculator {
|
||||
return {
|
||||
...acc,
|
||||
...{
|
||||
[source]: (!!acc[source] ? acc[source].plus(assetAmount) : assetAmount).dividedBy(totalAssetAmount),
|
||||
[source]: !!acc[source]
|
||||
? acc[source].plus(assetAmount.dividedBy(totalAssetAmount))
|
||||
: assetAmount.dividedBy(totalAssetAmount),
|
||||
},
|
||||
};
|
||||
}, breakdown);
|
||||
|
Loading…
x
Reference in New Issue
Block a user