Skip to content

Commit

Permalink
fix: price fix
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-path committed Jan 5, 2025
1 parent 41c76a3 commit 6608114
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion screens/Trading/components/ClosePositionMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const ClosePositionMobile: React.FC<IClosePositionMobileProps> = ({
swapFee:
((estimateData?.fee ?? 0) / 10000) *
+shrinkToken(tokenInAmount || "0", assetP.metadata.decimals) *
(actionShowRedColor ? 1 : priceD || 0),
(assetP?.price?.usd || 0),
};
}, [collateral, ReduxcategoryAssets1, estimateData]);

Expand Down
4 changes: 3 additions & 1 deletion screens/Trading/components/TradingOperate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ const TradingOperate: React.FC<TradingOperateProps> = ({ onMobileClose }) => {
swapFee:
((estimateData?.fee ?? 0) / 10000) *
Number(tokenInAmount) *
(activeTab == "long" ? 1 : getAssetPrice(ReduxcategoryAssets1) || 0),
(activeTab == "long"
? getAssetPrice(ReduxcategoryAssets2) || 0
: getAssetPrice(ReduxcategoryAssets1) || 0),
price: getAssetPrice(ReduxcategoryAssets1),
};
}, [longInput, shortInput, ReduxcategoryAssets1, estimateData, tokenInAmount]);
Expand Down

0 comments on commit 6608114

Please sign in to comment.