|
@@ -72,7 +72,6 @@ function MyLPPageContent() {
|
|
|
`/api/my-lp/detail?address=${position.positionAddress}`
|
|
`/api/my-lp/detail?address=${position.positionAddress}`
|
|
|
)
|
|
)
|
|
|
const data = await response.json()
|
|
const data = await response.json()
|
|
|
- console.log(data, 'data')
|
|
|
|
|
const newLpList = positions.map((item) => {
|
|
const newLpList = positions.map((item) => {
|
|
|
if (item.positionAddress === position.positionAddress) {
|
|
if (item.positionAddress === position.positionAddress) {
|
|
|
return Object.assign(item, data.result.data, { hasDetail: true })
|
|
return Object.assign(item, data.result.data, { hasDetail: true })
|
|
@@ -93,7 +92,6 @@ function MyLPPageContent() {
|
|
|
`/api/my-lp?userAddress=${encodeURIComponent(adddr)}&page=${page}&pageSize=${pageSize}`
|
|
`/api/my-lp?userAddress=${encodeURIComponent(adddr)}&page=${page}&pageSize=${pageSize}`
|
|
|
)
|
|
)
|
|
|
const data = await response.json()
|
|
const data = await response.json()
|
|
|
- console.log(data, 'data')
|
|
|
|
|
const { positions, total, poolMap } = data.result?.data
|
|
const { positions, total, poolMap } = data.result?.data
|
|
|
if (data.retCode === 0 && data.result) {
|
|
if (data.retCode === 0 && data.result) {
|
|
|
setLpList(positions as RecordInfo[])
|
|
setLpList(positions as RecordInfo[])
|
|
@@ -250,7 +248,7 @@ function MyLPPageContent() {
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: 'PNL Percent',
|
|
title: 'PNL Percent',
|
|
|
- dataIndex: 'pnlUsd',
|
|
|
|
|
|
|
+ dataIndex: 'pnlUsdPercent',
|
|
|
key: 'pnlUsdPercent',
|
|
key: 'pnlUsdPercent',
|
|
|
render: (text: string) => (
|
|
render: (text: string) => (
|
|
|
<span
|
|
<span
|
|
@@ -264,7 +262,7 @@ function MyLPPageContent() {
|
|
|
{
|
|
{
|
|
|
title: 'Earned',
|
|
title: 'Earned',
|
|
|
dataIndex: 'earnedUsd',
|
|
dataIndex: 'earnedUsd',
|
|
|
- key: 'pnlUsd',
|
|
|
|
|
|
|
+ key: 'earnedUsd',
|
|
|
render: (text: string) => (
|
|
render: (text: string) => (
|
|
|
<span className="font-mono text-sm">${Number(text).toFixed(2)}</span>
|
|
<span className="font-mono text-sm">${Number(text).toFixed(2)}</span>
|
|
|
),
|
|
),
|
|
@@ -459,7 +457,6 @@ function MyLPPageContent() {
|
|
|
placeholder="请输入你的 Solana 地址"
|
|
placeholder="请输入你的 Solana 地址"
|
|
|
value={inputValue}
|
|
value={inputValue}
|
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
|
- console.log(e.target.value)
|
|
|
|
|
setInputValue(e.target.value)
|
|
setInputValue(e.target.value)
|
|
|
}}
|
|
}}
|
|
|
/>
|
|
/>
|