@compass-labs/widgets 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +31 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3904,8 +3904,21 @@ function EarnAccount({
|
|
|
3904
3904
|
return {
|
|
3905
3905
|
balance: usdcPosition.balance || "0",
|
|
3906
3906
|
pnl: usdcPosition.pnl ? {
|
|
3907
|
-
|
|
3908
|
-
|
|
3907
|
+
unrealizedPnl: usdcPosition.pnl.unrealizedPnl || "0",
|
|
3908
|
+
realizedPnl: usdcPosition.pnl.realizedPnl || "0",
|
|
3909
|
+
totalPnl: usdcPosition.pnl.totalPnl || "0",
|
|
3910
|
+
totalDeposited: usdcPosition.pnl.totalDeposited || "0"
|
|
3911
|
+
} : void 0,
|
|
3912
|
+
deposits: (usdcPosition.deposits || []).map((d) => ({
|
|
3913
|
+
amount: d.inputAmount || d.amount || "0",
|
|
3914
|
+
blockNumber: d.blockNumber || 0,
|
|
3915
|
+
txHash: d.transactionHash || d.txHash || ""
|
|
3916
|
+
})),
|
|
3917
|
+
withdrawals: (usdcPosition.withdrawals || []).map((w) => ({
|
|
3918
|
+
amount: w.outputAmount || w.amount || "0",
|
|
3919
|
+
blockNumber: w.blockNumber || 0,
|
|
3920
|
+
txHash: w.transactionHash || w.txHash || ""
|
|
3921
|
+
}))
|
|
3909
3922
|
};
|
|
3910
3923
|
},
|
|
3911
3924
|
enabled: !!address,
|
|
@@ -4367,6 +4380,22 @@ function EarnAccount({
|
|
|
4367
4380
|
]
|
|
4368
4381
|
}
|
|
4369
4382
|
),
|
|
4383
|
+
userPosition?.pnl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4384
|
+
PnLSummary,
|
|
4385
|
+
{
|
|
4386
|
+
pnl: userPosition.pnl,
|
|
4387
|
+
tokenSymbol: "USDC",
|
|
4388
|
+
tokenPrice: 1
|
|
4389
|
+
}
|
|
4390
|
+
),
|
|
4391
|
+
userPosition?.deposits?.length || userPosition?.withdrawals?.length ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4392
|
+
TransactionHistory,
|
|
4393
|
+
{
|
|
4394
|
+
deposits: userPosition.deposits,
|
|
4395
|
+
withdrawals: userPosition.withdrawals,
|
|
4396
|
+
tokenSymbol: "USDC"
|
|
4397
|
+
}
|
|
4398
|
+
) : null,
|
|
4370
4399
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4371
4400
|
"div",
|
|
4372
4401
|
{
|