Skip to content

Commit 1b7623a

Browse files
authored
Merge pull request #2035 from AmbireTech/fix-duplication-defi-positions-in-usd-balance
Prevent duplication of the value of positionInUSD
2 parents ce43f3d + 8da3ccc commit 1b7623a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/controllers/defiPositions/defiPositions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,9 @@ export class DefiPositionsController extends EventEmitter implements IDefiPositi
578578

579579
const value = getAssetValue(asset.amount, asset.decimals, priceIn) || 0
580580

581-
positionInUSD += value
581+
if (!position.additionalData.positionInUSD) {
582+
positionInUSD += value
583+
}
582584

583585
return { ...asset, value, priceIn: priceIn[0] }
584586
})

0 commit comments

Comments
 (0)