diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1dc35c0c..195be3949 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -104,31 +104,31 @@ importers: version: 0.7.2 applesauce-accounts: specifier: next - version: 0.0.0-next-20250310173615(typescript@5.8.2) + version: 0.0.0-next-20250310180212(typescript@5.8.2) applesauce-content: specifier: next - version: 0.0.0-next-20250310173615(typescript@5.8.2) + version: 0.0.0-next-20250310180212(typescript@5.8.2) applesauce-core: specifier: next - version: 0.0.0-next-20250310173615(typescript@5.8.2) + version: 0.0.0-next-20250310180212(typescript@5.8.2) applesauce-factory: specifier: next - version: 0.0.0-next-20250310173615(typescript@5.8.2) + version: 0.0.0-next-20250310180212(typescript@5.8.2) applesauce-loaders: specifier: next - version: 0.0.0-next-20250310173615(typescript@5.8.2) + version: 0.0.0-next-20250310180212(typescript@5.8.2) applesauce-react: specifier: next - version: 0.0.0-next-20250310173615(react-dom@19.0.0(react@19.0.0))(typescript@5.8.2) + version: 0.0.0-next-20250310180212(react-dom@19.0.0(react@19.0.0))(typescript@5.8.2) applesauce-relay: specifier: next - version: 0.0.0-next-20250310173615(typescript@5.8.2) + version: 0.0.0-next-20250310180212(typescript@5.8.2) applesauce-signers: specifier: next - version: 0.0.0-next-20250310173615(typescript@5.8.2) + version: 0.0.0-next-20250310180212(typescript@5.8.2) applesauce-wallet: specifier: next - version: 0.0.0-next-20250310173615(typescript@5.8.2) + version: 0.0.0-next-20250310180212(typescript@5.8.2) bech32: specifier: ^2.0.0 version: 2.0.0 @@ -2195,32 +2195,32 @@ packages: engines: {node: '>=8.0.0'} hasBin: true - applesauce-accounts@0.0.0-next-20250310173615: - resolution: {integrity: sha512-u77ZnfQcoCZrI7i2xncbfheeuEAdOLwaw7RhId6nYg5Km4D+TBWSpaz0GXUlXDl13V3Enx1TraMEuZXDoTMu2A==} + applesauce-accounts@0.0.0-next-20250310180212: + resolution: {integrity: sha512-YiK7ZGymP14MT4ESFQgvCM5Tw7NblheDJ9ZQFqKvas3h7vfPwQt66sAJfTurMJ6a/9zq52MJ+mDrlYzaLavSJg==} - applesauce-content@0.0.0-next-20250310173615: - resolution: {integrity: sha512-n1h1uEGAAIXRf9WNr/EXENTrPaSvHHjFUiJDYHcvDgRFMSQ0v5psRbwFqYHqGaVcOMt4v5xIdULOxRMIp0CEgA==} + applesauce-content@0.0.0-next-20250310180212: + resolution: {integrity: sha512-QBDCaGu9ciEfsqHDDpaKuTp2C3A+ouRnOhztsVcGBulsBZethldREKTEHrbQgWiJZiqpO6+IXSti8tFsvUk2cQ==} - applesauce-core@0.0.0-next-20250310173615: - resolution: {integrity: sha512-WrHmZM26rXKtGlCnK4pIzAPCQjGHf04ASVbY2XihjjY9gUdxCoS/BP7EPw7fihxItKDHboGb8yNTP8YRQDDHLw==} + applesauce-core@0.0.0-next-20250310180212: + resolution: {integrity: sha512-MNg4qzXYt3wQjuEZoB70XcQaitMyUFDcsY8rlF6JBhrw1WhWh0AwmDlrQCK/uW3WT3+dGaa2xhTOtc7iGDRGJw==} - applesauce-factory@0.0.0-next-20250310173615: - resolution: {integrity: sha512-10p2jqekpcDed9FvcIiFizDDHElLwjXDbYRiAn1yTRktfDRZmaJPZmhcmcdGad5wishckMd/1DghLymiPa2SWg==} + applesauce-factory@0.0.0-next-20250310180212: + resolution: {integrity: sha512-10v+Pj8j/hxeJixyQpbJFZ2ByDWvpchlHsonHEgrS3eO5mJtjkd6eEUkC65C9y3YRAltJV9ui8QcH8e84XaJHA==} - applesauce-loaders@0.0.0-next-20250310173615: - resolution: {integrity: sha512-eBZ94vqb/+olkDKa3ko8Wn7Dp6BVDas7OQJf+uWrkq1dfG1uN+HYSc1pQgP6imqmP6V3/vHWNQ2/LWCB4nIKUQ==} + applesauce-loaders@0.0.0-next-20250310180212: + resolution: {integrity: sha512-KRZGUkYAu9c632aLCyPv2aRA72mrBsMaHPFhzeSusuti43DKrxMcJvtdpNcGUeZoyLA0vmZ7o4r97skYQWIMIg==} - applesauce-react@0.0.0-next-20250310173615: - resolution: {integrity: sha512-e8I2fj/8su9TD3cpMpod1H0ETa1jaKtEi9bYzPRQtSQTtaC5Lm436gT0bHUQMn2qFlosEDNxMXOqbpjFjvEbHA==} + applesauce-react@0.0.0-next-20250310180212: + resolution: {integrity: sha512-JUyCDcXMOmQWdzPK/JC/zgX32WPGG9Df3PlEHdK5n+TdDndYKwsH8gRzqZBIi1+UooBYLzurZbmALUxIobLlPQ==} - applesauce-relay@0.0.0-next-20250310173615: - resolution: {integrity: sha512-UwJ0cZc6r0OWjVuLBfjF6vfQOUa2o+jbKNowHFlZpmLEYAzqagAWxf4T+DJfWqcv8SOd/AxpUanCTY+0QB8i6A==} + applesauce-relay@0.0.0-next-20250310180212: + resolution: {integrity: sha512-QQ2NZ0di6N4ztN+vw+AGOakH+uFy+PiKtW7KxZb3Xxu3bSqHZnNOscEzSgkkRQMXTGqiNbwortfMh1CpCzVu2w==} - applesauce-signers@0.0.0-next-20250310173615: - resolution: {integrity: sha512-uAQWA6U7ZSjh+VWkEnbJfL9I6p80s0qXmnUg28+ZDpTbTEEJaZUAFK/Ykxs4BkfzrVHuXeSvVUafFtNxfznFLg==} + applesauce-signers@0.0.0-next-20250310180212: + resolution: {integrity: sha512-L/buvcLiw/s17uegYebiVZWQH3cIDXhv3xKzvlug4zuGNCDL1MKnQB6RwQ+GF9kdyIEFg5gkgHbsB6xblGaaog==} - applesauce-wallet@0.0.0-next-20250310173615: - resolution: {integrity: sha512-fs0edz3COnYyuz4jMD6JKKN5+lIoaz20ycj07P+PFAYYcz4GeTV9Od46QXEqhPIoC82H/tUTRzw5qw8L0iZ0Ag==} + applesauce-wallet@0.0.0-next-20250310180212: + resolution: {integrity: sha512-XLhFj4GQyuGXzJ2kQbOabIH9rEzWq3iK7hFrtCL9PRM+ct6nq+Mrm2YW2JhyZ4Q9WahA96GkEEj824qn3empZA==} arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} @@ -8435,10 +8435,10 @@ snapshots: dependencies: entities: 2.2.0 - applesauce-accounts@0.0.0-next-20250310173615(typescript@5.8.2): + applesauce-accounts@0.0.0-next-20250310180212(typescript@5.8.2): dependencies: '@noble/hashes': 1.7.1 - applesauce-signers: 0.0.0-next-20250310173615(typescript@5.8.2) + applesauce-signers: 0.0.0-next-20250310180212(typescript@5.8.2) nanoid: 5.1.3 nostr-tools: 2.10.4(typescript@5.8.2) rxjs: 7.8.2 @@ -8446,13 +8446,13 @@ snapshots: - supports-color - typescript - applesauce-content@0.0.0-next-20250310173615(typescript@5.8.2): + applesauce-content@0.0.0-next-20250310180212(typescript@5.8.2): dependencies: '@cashu/cashu-ts': 2.0.0-rc1 '@types/hast': 3.0.4 '@types/mdast': 4.0.4 '@types/unist': 3.0.3 - applesauce-core: 0.0.0-next-20250310173615(typescript@5.8.2) + applesauce-core: 0.0.0-next-20250310180212(typescript@5.8.2) mdast-util-find-and-replace: 3.0.2 nostr-tools: 2.10.4(typescript@5.8.2) remark: 15.0.1 @@ -8463,7 +8463,7 @@ snapshots: - supports-color - typescript - applesauce-core@0.0.0-next-20250310173615(typescript@5.8.2): + applesauce-core@0.0.0-next-20250310180212(typescript@5.8.2): dependencies: '@noble/hashes': 1.7.1 '@scure/base': 1.2.4 @@ -8478,19 +8478,19 @@ snapshots: - supports-color - typescript - applesauce-factory@0.0.0-next-20250310173615(typescript@5.8.2): + applesauce-factory@0.0.0-next-20250310180212(typescript@5.8.2): dependencies: - applesauce-content: 0.0.0-next-20250310173615(typescript@5.8.2) - applesauce-core: 0.0.0-next-20250310173615(typescript@5.8.2) + applesauce-content: 0.0.0-next-20250310180212(typescript@5.8.2) + applesauce-core: 0.0.0-next-20250310180212(typescript@5.8.2) nanoid: 5.1.3 nostr-tools: 2.10.4(typescript@5.8.2) transitivePeerDependencies: - supports-color - typescript - applesauce-loaders@0.0.0-next-20250310173615(typescript@5.8.2): + applesauce-loaders@0.0.0-next-20250310180212(typescript@5.8.2): dependencies: - applesauce-core: 0.0.0-next-20250310173615(typescript@5.8.2) + applesauce-core: 0.0.0-next-20250310180212(typescript@5.8.2) nanoid: 5.1.3 nostr-tools: 2.10.4(typescript@5.8.2) rx-nostr: 3.5.0 @@ -8499,12 +8499,12 @@ snapshots: - supports-color - typescript - applesauce-react@0.0.0-next-20250310173615(react-dom@19.0.0(react@19.0.0))(typescript@5.8.2): + applesauce-react@0.0.0-next-20250310180212(react-dom@19.0.0(react@19.0.0))(typescript@5.8.2): dependencies: - applesauce-accounts: 0.0.0-next-20250310173615(typescript@5.8.2) - applesauce-content: 0.0.0-next-20250310173615(typescript@5.8.2) - applesauce-core: 0.0.0-next-20250310173615(typescript@5.8.2) - applesauce-factory: 0.0.0-next-20250310173615(typescript@5.8.2) + applesauce-accounts: 0.0.0-next-20250310180212(typescript@5.8.2) + applesauce-content: 0.0.0-next-20250310180212(typescript@5.8.2) + applesauce-core: 0.0.0-next-20250310180212(typescript@5.8.2) + applesauce-factory: 0.0.0-next-20250310180212(typescript@5.8.2) nostr-tools: 2.10.4(typescript@5.8.2) observable-hooks: 4.2.4(react-dom@19.0.0(react@19.0.0))(react@18.3.1)(rxjs@7.8.2) react: 18.3.1 @@ -8514,9 +8514,9 @@ snapshots: - supports-color - typescript - applesauce-relay@0.0.0-next-20250310173615(typescript@5.8.2): + applesauce-relay@0.0.0-next-20250310180212(typescript@5.8.2): dependencies: - applesauce-core: 0.0.0-next-20250310173615(typescript@5.8.2) + applesauce-core: 0.0.0-next-20250310180212(typescript@5.8.2) nanoid: 5.1.3 nostr-tools: 2.10.4(typescript@5.8.2) rxjs: 7.8.2 @@ -8524,12 +8524,12 @@ snapshots: - supports-color - typescript - applesauce-signers@0.0.0-next-20250310173615(typescript@5.8.2): + applesauce-signers@0.0.0-next-20250310180212(typescript@5.8.2): dependencies: '@noble/hashes': 1.7.1 '@noble/secp256k1': 1.7.1 '@scure/base': 1.2.4 - applesauce-core: 0.0.0-next-20250310173615(typescript@5.8.2) + applesauce-core: 0.0.0-next-20250310180212(typescript@5.8.2) debug: 4.4.0 nanoid: 5.1.3 nostr-tools: 2.10.4(typescript@5.8.2) @@ -8537,9 +8537,9 @@ snapshots: - supports-color - typescript - applesauce-wallet@0.0.0-next-20250310173615(typescript@5.8.2): + applesauce-wallet@0.0.0-next-20250310180212(typescript@5.8.2): dependencies: - applesauce-core: 0.0.0-next-20250310173615(typescript@5.8.2) + applesauce-core: 0.0.0-next-20250310180212(typescript@5.8.2) nostr-tools: 2.10.4(typescript@5.8.2) rxjs: 7.8.2 transitivePeerDependencies: diff --git a/src/components/cashu/cashu-mint-favicon.tsx b/src/components/cashu/cashu-mint-favicon.tsx index 9ecbe56f9..176b88b15 100644 --- a/src/components/cashu/cashu-mint-favicon.tsx +++ b/src/components/cashu/cashu-mint-favicon.tsx @@ -1,20 +1,11 @@ -import { useMemo } from "react"; -import { useAsync } from "react-use"; import { Avatar, AvatarProps } from "@chakra-ui/react"; import { MediaServerIcon } from "../icons"; -import { getCashuMint } from "../../services/cashu-mints"; +import { cashuMintInfo } from "../../services/cashu-mints"; +import { useObservable } from "applesauce-react/hooks"; export default function CashuMintFavicon({ mint, ...props }: { mint: string } & Omit) { - const { value: cashuMint } = useAsync(() => getCashuMint(mint), [mint]); - const { value: info } = useAsync(async () => cashuMint?.getInfo(), [cashuMint]); + const info = useObservable(cashuMintInfo(mint)); - const url = useMemo(() => { - const url = new URL(mint); - url.protocol = "https:"; - url.pathname = "/favicon.ico"; - return url.toString(); - }, [mint]); - - return } overflow="hidden" {...props} />; + return } overflow="hidden" {...props} />; } diff --git a/src/views/wallet/tabs/history.tsx b/src/views/wallet/tabs/history.tsx index 5d7a9ffea..cceffd8c9 100644 --- a/src/views/wallet/tabs/history.tsx +++ b/src/views/wallet/tabs/history.tsx @@ -32,6 +32,8 @@ import useEventUpdate from "../../../hooks/use-event-update"; import Timestamp from "../../../components/timestamp"; import useSingleEvents from "../../../hooks/use-single-events"; import UserAvatarLink from "../../../components/user/user-avatar-link"; +import CashuMintFavicon from "../../../components/cashu/cashu-mint-favicon"; +import CashuMintName from "../../../components/cashu/cashu-mint-name"; function HistoryEntry({ entry }: { entry: NostrEvent }) { const account = useActiveAccount()!; @@ -80,14 +82,29 @@ function HistoryEntry({ entry }: { entry: NostrEvent }) { /> - {redeemed.length > 0 && ( - - Redeemed zaps from: - - {redeemed.map((event) => ( - - ))} - + {details && ( + + {details.mint && ( + <> + + + + )} + {redeemed.length > 0 && ( + <> + Redeemed zaps from: + + {redeemed.map((event) => ( + + ))} + + + )} + {details.fee !== undefined && ( + + fee: {details.fee} + + )} )}