diff --git a/package-lock.json b/package-lock.json index e6bebe45..d083d0d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simple-staking", - "version": "0.3.5", + "version": "0.3.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "simple-staking", - "version": "0.3.5", + "version": "0.3.9", "dependencies": { "@babylonlabs-io/btc-staking-ts": "0.3.0", "@bitcoin-js/tiny-secp256k1-asmjs": "2.2.3", diff --git a/package.json b/package.json index c78586e2..a2a3311e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-staking", - "version": "0.3.5", + "version": "0.3.9", "private": true, "scripts": { "dev": "next dev", diff --git a/src/app/components/Points/DelegationPoints.tsx b/src/app/components/Points/DelegationPoints.tsx index 43c7b78c..dfe9b3d6 100644 --- a/src/app/components/Points/DelegationPoints.tsx +++ b/src/app/components/Points/DelegationPoints.tsx @@ -1,10 +1,11 @@ import React from "react"; -import { NumericFormat } from "react-number-format"; import { useDelegationsPoints } from "@/app/context/api/DelegationsPointsProvider"; import { useHealthCheck } from "@/app/hooks/useHealthCheck"; import { shouldDisplayPoints } from "@/config"; +import { Points } from "./Points"; + interface DelegationPointsProps { stakingTxHash: string; className?: string; @@ -37,16 +38,7 @@ export const DelegationPoints: React.FC = ({

Points: - {points !== undefined ? ( - - ) : ( - "n.a." - )} +

diff --git a/src/app/components/Points/Points.tsx b/src/app/components/Points/Points.tsx new file mode 100644 index 00000000..815cb2a8 --- /dev/null +++ b/src/app/components/Points/Points.tsx @@ -0,0 +1,37 @@ +import React from "react"; +import { NumericFormat } from "react-number-format"; +import { Tooltip } from "react-tooltip"; + +interface PointsProps { + points: number | undefined; +} + +export const Points: React.FC = ({ points }) => { + if (points === undefined || points === 0) { + return <>n.a.; + } + + if (points < 0.001 && points > 0) { + return ( + <> + + <0.001 + + + + ); + } + + return ( + + ); +}; diff --git a/src/app/components/Points/StakerPoints.tsx b/src/app/components/Points/StakerPoints.tsx index 6af6007e..b3ab859a 100644 --- a/src/app/components/Points/StakerPoints.tsx +++ b/src/app/components/Points/StakerPoints.tsx @@ -1,9 +1,10 @@ import { useQuery } from "@tanstack/react-query"; import React from "react"; -import { NumericFormat } from "react-number-format"; import { getStakersPoints } from "@/app/api/getPoints"; +import { Points } from "./Points"; + interface StakerPointsProps { publicKeyNoCoord: string; } @@ -33,16 +34,7 @@ export const StakerPoints: React.FC = ({ return (

- {points !== undefined ? ( - - ) : ( - "n.a." - )} +

); diff --git a/src/utils/wallet/list.ts b/src/utils/wallet/list.ts index a1ee7e1d..7db9eb66 100644 --- a/src/utils/wallet/list.ts +++ b/src/utils/wallet/list.ts @@ -68,7 +68,7 @@ export const walletList: IntegratedWallet[] = [ provider: cactusLinkProvider, linkToDocs: "https://chromewebstore.google.com/detail/cactus-link/chiilpgkfmcopocdffapngjcbggdehmj?pli=1", - supportedNetworks: [Network.SIGNET], + supportedNetworks: [Network.MAINNET, Network.SIGNET], }, { name: "Keystone", diff --git a/src/utils/wallet/providers/cactuslink_wallet.ts b/src/utils/wallet/providers/cactuslink_wallet.ts index c2d3f835..5842ddb8 100644 --- a/src/utils/wallet/providers/cactuslink_wallet.ts +++ b/src/utils/wallet/providers/cactuslink_wallet.ts @@ -169,6 +169,7 @@ export class CactusLinkWallet extends WalletProvider { }; getInscriptions(): Promise { - throw new Error("Method not implemented."); + // Temporary solution to ignore inscriptions filtering for Cactus Link Wallet + return Promise.resolve([]); } }