Merge branch 'production' into main
This commit is contained in:
commit
856e54df8a
|
@ -136,12 +136,12 @@ export const ConnectWalletButton: React.FC = () => {
|
|||
{!loadProfileDetails && !isMobile ? (
|
||||
<div className="ml-2 w-32 text-left">
|
||||
<p className="mb-0.5 truncate text-xs font-bold capitalize text-th-fgd-1">
|
||||
{profileDetails.profile_name}
|
||||
{profileDetails?.profile_name}
|
||||
</p>
|
||||
<p className="mb-0 text-xs text-th-fgd-4">
|
||||
{profileDetails.wallet_pk
|
||||
{profileDetails?.wallet_pk
|
||||
? abbreviateAddress(
|
||||
new PublicKey(profileDetails.wallet_pk)
|
||||
new PublicKey(profileDetails?.wallet_pk)
|
||||
)
|
||||
: ''}
|
||||
</p>
|
||||
|
|
|
@ -115,7 +115,7 @@ const MarketDetails = () => {
|
|||
</Tooltip>
|
||||
</div>
|
||||
<div className="text-th-fgd-1 md:text-xs">
|
||||
{`${market?.funding1h.toFixed(4)}% (${(
|
||||
{`${market?.funding1h?.toFixed(4)}% (${(
|
||||
market?.funding1h *
|
||||
24 *
|
||||
365
|
||||
|
@ -129,7 +129,7 @@ const MarketDetails = () => {
|
|||
<div className="flex items-center text-th-fgd-1 md:text-xs">
|
||||
{usdFormatter(market?.openInterestUsd, 0)}
|
||||
<Tooltip
|
||||
content={`${market?.openInterest.toLocaleString(
|
||||
content={`${market?.openInterest?.toLocaleString(
|
||||
undefined,
|
||||
{
|
||||
maximumFractionDigits:
|
||||
|
|
|
@ -14,6 +14,8 @@ const ProfileImage = ({
|
|||
}) => {
|
||||
const profile = useMangoStore((s) => s.profile.details)
|
||||
|
||||
if (!profile) return null
|
||||
|
||||
return imageUrl || (isOwnerProfile && profile.profile_image_url) ? (
|
||||
<img
|
||||
alt=""
|
||||
|
|
|
@ -149,6 +149,7 @@ const AccountOverviewStats = ({ hourlyPerformanceStats, accountValue }) => {
|
|||
if (performanceRange === '3m') {
|
||||
setChartData(hourlyPerformanceStats.slice().reverse())
|
||||
}
|
||||
if (!chartData?.length) return
|
||||
if (performanceRange === '30d') {
|
||||
const start = new Date(
|
||||
// @ts-ignore
|
||||
|
@ -157,7 +158,8 @@ const AccountOverviewStats = ({ hourlyPerformanceStats, accountValue }) => {
|
|||
const chartData = cloneDeep(hourlyPerformanceStats).filter(
|
||||
(d) => new Date(d.time).getTime() > start
|
||||
)
|
||||
const pnlStart = chartData[chartData.length - 1].pnl
|
||||
|
||||
const pnlStart = chartData[chartData.length - 1]?.pnl
|
||||
const perpPnlStart = chartData[chartData.length - 1].perp_pnl
|
||||
for (let i = 0; i < chartData.length; i++) {
|
||||
if (i === chartData.length - 1) {
|
||||
|
|
|
@ -333,7 +333,7 @@ export default function Account() {
|
|||
{pubkey && mangoAccount ? (
|
||||
profileData && !loadProfileDetails ? (
|
||||
<Link
|
||||
href={`/profile?name=${profileData?.profile_name.replace(
|
||||
href={`/profile?name=${profileData?.profile_name?.replace(
|
||||
/\s/g,
|
||||
'-'
|
||||
)}`}
|
||||
|
|
Loading…
Reference in New Issue