@fluent.xyz/connect 0.8.0 → 0.8.1
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/fluent-connect.css +1 -1
- package/dist/index.js +978 -686
- package/dist/index.js.map +1 -1
- package/dist/internal.js +5 -4
- package/dist/internal.js.map +1 -1
- package/docs/concepts.md +20 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './polyfills/buffer.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { createContext, forwardRef, useContext, useState,
|
|
4
|
+
import { createContext, forwardRef, useContext, useState, useMemo, useRef, useCallback, useEffect, useLayoutEffect, Fragment as Fragment$1 } from 'react';
|
|
5
5
|
import { QueryClient, QueryClientContext, QueryClientProvider, useQuery, useInfiniteQuery, useQueries } from '@tanstack/react-query';
|
|
6
6
|
import * as web from '@privy-io/react-auth';
|
|
7
7
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
@@ -4540,8 +4540,9 @@ function getFluentChainByChainId(chainId) {
|
|
|
4540
4540
|
return Object.values(fluentChains).find((c) => c.chainId === chainId);
|
|
4541
4541
|
}
|
|
4542
4542
|
function getL1ForFluentChain(fluent3) {
|
|
4543
|
-
|
|
4544
|
-
|
|
4543
|
+
const parent = fluent3.parent;
|
|
4544
|
+
if (!parent) return void 0;
|
|
4545
|
+
return Object.values(l1Chains).find((l1) => l1.chainId === parent.chainId);
|
|
4545
4546
|
}
|
|
4546
4547
|
function toContract(entry) {
|
|
4547
4548
|
return { address: entry.address };
|
|
@@ -4696,7 +4697,8 @@ async function readFluentTokenBalances(params) {
|
|
|
4696
4697
|
return Promise.all(
|
|
4697
4698
|
params.tokens.map(async (token) => {
|
|
4698
4699
|
const native = isFluentNativeToken(token);
|
|
4699
|
-
|
|
4700
|
+
const address = native ? void 0 : token.address;
|
|
4701
|
+
if (!native && !address) {
|
|
4700
4702
|
return {
|
|
4701
4703
|
...token,
|
|
4702
4704
|
raw: null,
|
|
@@ -4705,12 +4707,12 @@ async function readFluentTokenBalances(params) {
|
|
|
4705
4707
|
};
|
|
4706
4708
|
}
|
|
4707
4709
|
try {
|
|
4708
|
-
const raw =
|
|
4709
|
-
address
|
|
4710
|
+
const raw = address ? await params.client.readContract({
|
|
4711
|
+
address,
|
|
4710
4712
|
abi: balanceOfAbi,
|
|
4711
4713
|
functionName: "balanceOf",
|
|
4712
4714
|
args: [params.account]
|
|
4713
|
-
});
|
|
4715
|
+
}) : await params.client.getBalance({ address: params.account });
|
|
4714
4716
|
return {
|
|
4715
4717
|
...token,
|
|
4716
4718
|
raw,
|
|
@@ -4964,16 +4966,16 @@ var fluent2 = {
|
|
|
4964
4966
|
};
|
|
4965
4967
|
|
|
4966
4968
|
// src/assets/brand/coinbase.svg
|
|
4967
|
-
var coinbase_default = 'data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<path d="M17.1797 10.0983C16.4594 7.8401 14.5619 6.32185 12.1704 6.32185C8.86954 6.32185 6.59258 8.93088 6.59115 12.4744C6.59115 15.9782 8.90534 18.5872 12.2076 18.5872C14.5992 18.5872 16.4966 17.0292 17.1797 14.771H21.9628C21.0892 19.6382 17.1425 22.9091 12.2091 22.9091C6.36489 22.9091 2 18.4708 2 12.4744C2 6.4781 6.47802 2 12.2091 2C17.2556 2 21.1265 5.27087 22 10.0983H17.1797Z" fill="%230052FF"/>%0A</svg>%0A';
|
|
4969
|
+
var coinbase_default = 'data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<title>Coinbase</title>%0A<path d="M17.1797 10.0983C16.4594 7.8401 14.5619 6.32185 12.1704 6.32185C8.86954 6.32185 6.59258 8.93088 6.59115 12.4744C6.59115 15.9782 8.90534 18.5872 12.2076 18.5872C14.5992 18.5872 16.4966 17.0292 17.1797 14.771H21.9628C21.0892 19.6382 17.1425 22.9091 12.2091 22.9091C6.36489 22.9091 2 18.4708 2 12.4744C2 6.4781 6.47802 2 12.2091 2C17.2556 2 21.1265 5.27087 22 10.0983H17.1797Z" fill="%230052FF"/>%0A</svg>%0A';
|
|
4968
4970
|
|
|
4969
4971
|
// src/assets/brand/fluent-logo.svg
|
|
4970
|
-
var fluent_logo_default = 'data:image/svg+xml,<svg viewBox="0 0 129 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <g clip-path="url(%23a)" fill="%23FFF">%0A <path d="M35.953 10.128V6.955H47.33v3.173H35.953Zm2.813 13.651V5.874c0-1.778.527-3.201 1.583-4.27C41.404.536 42.909 0 44.87 0c.704 0 1.368.074 1.997.223.629.149 1.156.382 1.582.7l-1.085 2.984a3.118 3.118 0 0 0-1.024-.523 4.056 4.056 0 0 0-1.183-.176c-.83 0-1.46.228-1.887.682-.427.456-.639 1.138-.639 2.048v1.904l.128 1.778v14.16h-3.996.002ZM50.664 23.779V.223h3.996v23.556h-3.996ZM65.679 23.999c-1.45 0-2.728-.27-3.837-.811-1.108-.54-1.971-1.366-2.588-2.477-.619-1.11-.926-2.514-.926-4.207v-9.68h3.996v9.144c0 1.525.347 2.663 1.038 3.412.692.75 1.678 1.128 2.956 1.128.938 0 1.752-.191 2.446-.57.691-.382 1.235-.953 1.63-1.716.394-.761.591-1.704.591-2.827v-8.57h3.996v16.953h-3.804v-4.572l.672 1.396a5.852 5.852 0 0 1-2.526 2.524c-1.108.582-2.324.873-3.644.873ZM87.06 23.998c-1.897 0-3.554-.377-4.97-1.128-1.417-.751-2.513-1.783-3.292-3.094-.778-1.312-1.165-2.804-1.165-4.475 0-1.671.377-3.191 1.136-4.493A8.115 8.115 0 0 1 81.9 7.744c1.33-.742 2.85-1.111 4.555-1.111 1.705 0 3.142.36 4.443 1.078a7.837 7.837 0 0 1 3.067 3.047c.747 1.312 1.119 2.857 1.119 4.637a12.164 12.164 0 0 1-.063 1.172H80.8v-2.635h12.113l-1.565.826c.02-.975-.182-1.83-.606-2.571a4.656 4.656 0 0 0-1.743-1.746c-.736-.424-1.582-.635-2.54-.635-.959 0-1.838.211-2.574.635a4.502 4.502 0 0 0-1.725 1.763c-.414.751-.623 1.634-.623 2.65v.635c0 1.017.234 1.916.703 2.697a4.673 4.673 0 0 0 1.982 1.81c.851.424 1.832.635 2.94.635.959 0 1.822-.149 2.589-.444a5.498 5.498 0 0 0 2.044-1.396l2.141 2.445c-.766.888-1.732 1.572-2.892 2.048-1.161.476-2.489.714-3.979.714h-.005ZM107.523 6.633c1.363 0 2.583.265 3.659.793 1.076.528 1.922 1.339 2.541 2.427.619 1.091.926 2.492.926 4.208v9.714h-3.996v-9.206c0-1.502-.357-2.623-1.071-3.364-.714-.742-1.71-1.111-2.988-1.111-.938 0-1.769.19-2.493.57a3.933 3.933 0 0 0-1.677 1.699c-.395.75-.592 1.698-.592 2.84v8.572h-3.996V6.824h3.804v4.572L100.968 10c.597-1.079 1.466-1.91 2.606-2.492 1.141-.583 2.456-.873 3.946-.873l.003-.002ZM116.297 10.127V6.953h11.376v3.174h-11.376Zm8.691 13.872c-1.875 0-3.325-.481-4.346-1.446-1.02-.964-1.535-2.385-1.535-4.27V3.079h3.996V18.19c0 .805.208 1.428.624 1.872.417.443.996.666 1.743.666.893 0 1.639-.233 2.236-.699l1.118 2.827c-.469.382-1.043.667-1.725.858a7.78 7.78 0 0 1-2.109.285h-.002ZM25.973 3.54V0H.027v3.54h11.547a24.248 24.248 0 0 0-5.776 4.92H0V12h3.28A23.715 23.715 0 0 0 .027 24h3.565c0-4.48 1.462-8.628 3.93-12.002h6.735c-3.46 2.838-5.668 7.133-5.668 11.928h3.564c0-6.578 5.386-11.928 12.008-11.928h1.782V8.457H10.815a20.585 20.585 0 0 1 13.373-4.919h1.783l.002.003Z"/>%0A </g>%0A <defs>%0A <clipPath id="a">%0A <path fill="%23FFF" d="M0 0h128.816v24H0z"/>%0A </clipPath>%0A </defs>%0A</svg>%0A';
|
|
4972
|
+
var fluent_logo_default = 'data:image/svg+xml,<svg viewBox="0 0 129 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <title>Fluent</title>%0A <g clip-path="url(%23a)" fill="%23FFF">%0A <path d="M35.953 10.128V6.955H47.33v3.173H35.953Zm2.813 13.651V5.874c0-1.778.527-3.201 1.583-4.27C41.404.536 42.909 0 44.87 0c.704 0 1.368.074 1.997.223.629.149 1.156.382 1.582.7l-1.085 2.984a3.118 3.118 0 0 0-1.024-.523 4.056 4.056 0 0 0-1.183-.176c-.83 0-1.46.228-1.887.682-.427.456-.639 1.138-.639 2.048v1.904l.128 1.778v14.16h-3.996.002ZM50.664 23.779V.223h3.996v23.556h-3.996ZM65.679 23.999c-1.45 0-2.728-.27-3.837-.811-1.108-.54-1.971-1.366-2.588-2.477-.619-1.11-.926-2.514-.926-4.207v-9.68h3.996v9.144c0 1.525.347 2.663 1.038 3.412.692.75 1.678 1.128 2.956 1.128.938 0 1.752-.191 2.446-.57.691-.382 1.235-.953 1.63-1.716.394-.761.591-1.704.591-2.827v-8.57h3.996v16.953h-3.804v-4.572l.672 1.396a5.852 5.852 0 0 1-2.526 2.524c-1.108.582-2.324.873-3.644.873ZM87.06 23.998c-1.897 0-3.554-.377-4.97-1.128-1.417-.751-2.513-1.783-3.292-3.094-.778-1.312-1.165-2.804-1.165-4.475 0-1.671.377-3.191 1.136-4.493A8.115 8.115 0 0 1 81.9 7.744c1.33-.742 2.85-1.111 4.555-1.111 1.705 0 3.142.36 4.443 1.078a7.837 7.837 0 0 1 3.067 3.047c.747 1.312 1.119 2.857 1.119 4.637a12.164 12.164 0 0 1-.063 1.172H80.8v-2.635h12.113l-1.565.826c.02-.975-.182-1.83-.606-2.571a4.656 4.656 0 0 0-1.743-1.746c-.736-.424-1.582-.635-2.54-.635-.959 0-1.838.211-2.574.635a4.502 4.502 0 0 0-1.725 1.763c-.414.751-.623 1.634-.623 2.65v.635c0 1.017.234 1.916.703 2.697a4.673 4.673 0 0 0 1.982 1.81c.851.424 1.832.635 2.94.635.959 0 1.822-.149 2.589-.444a5.498 5.498 0 0 0 2.044-1.396l2.141 2.445c-.766.888-1.732 1.572-2.892 2.048-1.161.476-2.489.714-3.979.714h-.005ZM107.523 6.633c1.363 0 2.583.265 3.659.793 1.076.528 1.922 1.339 2.541 2.427.619 1.091.926 2.492.926 4.208v9.714h-3.996v-9.206c0-1.502-.357-2.623-1.071-3.364-.714-.742-1.71-1.111-2.988-1.111-.938 0-1.769.19-2.493.57a3.933 3.933 0 0 0-1.677 1.699c-.395.75-.592 1.698-.592 2.84v8.572h-3.996V6.824h3.804v4.572L100.968 10c.597-1.079 1.466-1.91 2.606-2.492 1.141-.583 2.456-.873 3.946-.873l.003-.002ZM116.297 10.127V6.953h11.376v3.174h-11.376Zm8.691 13.872c-1.875 0-3.325-.481-4.346-1.446-1.02-.964-1.535-2.385-1.535-4.27V3.079h3.996V18.19c0 .805.208 1.428.624 1.872.417.443.996.666 1.743.666.893 0 1.639-.233 2.236-.699l1.118 2.827c-.469.382-1.043.667-1.725.858a7.78 7.78 0 0 1-2.109.285h-.002ZM25.973 3.54V0H.027v3.54h11.547a24.248 24.248 0 0 0-5.776 4.92H0V12h3.28A23.715 23.715 0 0 0 .027 24h3.565c0-4.48 1.462-8.628 3.93-12.002h6.735c-3.46 2.838-5.668 7.133-5.668 11.928h3.564c0-6.578 5.386-11.928 12.008-11.928h1.782V8.457H10.815a20.585 20.585 0 0 1 13.373-4.919h1.783l.002.003Z"/>%0A </g>%0A <defs>%0A <clipPath id="a">%0A <path fill="%23FFF" d="M0 0h128.816v24H0z"/>%0A </clipPath>%0A </defs>%0A</svg>%0A';
|
|
4971
4973
|
|
|
4972
4974
|
// src/assets/brand/metamask.png
|
|
4973
4975
|
var metamask_default = "data:image/png;base64,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";
|
|
4974
4976
|
|
|
4975
4977
|
// src/assets/brand/walletconnect.svg
|
|
4976
|
-
var walletconnect_default = 'data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<path d="M4.91462 7.9107C8.82902 4.02977 15.1737 4.02977 19.0881 7.9107L19.5585 8.37904C19.7531 8.5735 19.7531 8.88846 19.5585 9.08292L17.9473 10.6797C17.85 10.7755 17.6905 10.7755 17.5932 10.6797L16.9444 10.036C14.214 7.33007 9.78599 7.33007 7.05564 10.036L6.36089 10.7235C6.26357 10.8193 6.10408 10.8193 6.00676 10.7235L4.39558 9.12674C4.20095 8.93228 4.20095 8.61732 4.39558 8.42286L4.91192 7.9107H4.91462ZM22.4213 11.2137L23.854 12.6352C24.0487 12.8297 24.0487 13.1446 23.854 13.3391L17.3877 19.7507C17.1931 19.9452 16.8741 19.9452 16.6794 19.7507L12.0892 15.2015C12.0406 15.1522 11.9622 15.1522 11.9108 15.2015L7.32057 19.7507C7.12593 19.9452 6.80694 19.9452 6.6123 19.7507L0.145979 13.3391C-0.0486596 13.1446 -0.0486596 12.8297 0.145979 12.6352L1.57873 11.2137C1.77337 11.0193 2.09236 11.0193 2.287 11.2137L6.87723 15.763C6.92588 15.8123 7.00428 15.8123 7.05564 15.763L11.6459 11.2137C11.8405 11.0193 12.1595 11.0193 12.3541 11.2137L16.9444 15.7657C16.993 15.815 17.0714 15.815 17.1228 15.7657L21.713 11.2165C21.9076 11.022 22.2266 11.022 22.4213 11.2165V11.2137Z" fill="%235570FF"/>%0A</svg>%0A';
|
|
4978
|
+
var walletconnect_default = 'data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<title>WalletConnect</title>%0A<path d="M4.91462 7.9107C8.82902 4.02977 15.1737 4.02977 19.0881 7.9107L19.5585 8.37904C19.7531 8.5735 19.7531 8.88846 19.5585 9.08292L17.9473 10.6797C17.85 10.7755 17.6905 10.7755 17.5932 10.6797L16.9444 10.036C14.214 7.33007 9.78599 7.33007 7.05564 10.036L6.36089 10.7235C6.26357 10.8193 6.10408 10.8193 6.00676 10.7235L4.39558 9.12674C4.20095 8.93228 4.20095 8.61732 4.39558 8.42286L4.91192 7.9107H4.91462ZM22.4213 11.2137L23.854 12.6352C24.0487 12.8297 24.0487 13.1446 23.854 13.3391L17.3877 19.7507C17.1931 19.9452 16.8741 19.9452 16.6794 19.7507L12.0892 15.2015C12.0406 15.1522 11.9622 15.1522 11.9108 15.2015L7.32057 19.7507C7.12593 19.9452 6.80694 19.9452 6.6123 19.7507L0.145979 13.3391C-0.0486596 13.1446 -0.0486596 12.8297 0.145979 12.6352L1.57873 11.2137C1.77337 11.0193 2.09236 11.0193 2.287 11.2137L6.87723 15.763C6.92588 15.8123 7.00428 15.8123 7.05564 15.763L11.6459 11.2137C11.8405 11.0193 12.1595 11.0193 12.3541 11.2137L16.9444 15.7657C16.993 15.815 17.0714 15.815 17.1228 15.7657L21.713 11.2165C21.9076 11.022 22.2266 11.022 22.4213 11.2165V11.2137Z" fill="%235570FF"/>%0A</svg>%0A';
|
|
4977
4979
|
|
|
4978
4980
|
// src/assets/brandAssets.ts
|
|
4979
4981
|
var FLUENT_CONNECT_BUNDLED_ASSETS = {
|
|
@@ -5022,7 +5024,7 @@ function getFluentGasPaymentTokens(tokens) {
|
|
|
5022
5024
|
}
|
|
5023
5025
|
function getFluentGasPaymentEthValue(params) {
|
|
5024
5026
|
const balance = params.balance;
|
|
5025
|
-
if (
|
|
5027
|
+
if (balance?.status !== "ready" || balance.raw === null) {
|
|
5026
5028
|
return {
|
|
5027
5029
|
ethValueWei: null,
|
|
5028
5030
|
formatted: null,
|
|
@@ -5624,7 +5626,7 @@ function createFluentConnectForWidget(config) {
|
|
|
5624
5626
|
}
|
|
5625
5627
|
|
|
5626
5628
|
// package.json
|
|
5627
|
-
var version = "0.8.
|
|
5629
|
+
var version = "0.8.1";
|
|
5628
5630
|
|
|
5629
5631
|
// src/core/analytics.ts
|
|
5630
5632
|
var INSTANCE_NAME = "fluent";
|
|
@@ -5957,7 +5959,10 @@ var Button = forwardRef(function Button2({ className, variant = "default", size
|
|
|
5957
5959
|
isLink && linkVariants[variant ?? "default"],
|
|
5958
5960
|
className
|
|
5959
5961
|
),
|
|
5960
|
-
render:
|
|
5962
|
+
render: (
|
|
5963
|
+
// biome-ignore lint/a11y/useAnchorContent: Base UI renders the Button's children into this anchor
|
|
5964
|
+
isLink ? /* @__PURE__ */ jsx("a", { href, target, rel }) : render
|
|
5965
|
+
),
|
|
5961
5966
|
...props
|
|
5962
5967
|
}
|
|
5963
5968
|
);
|
|
@@ -6486,13 +6491,16 @@ function useBridgeTxHistoryPages({
|
|
|
6486
6491
|
}) {
|
|
6487
6492
|
return useInfiniteQuery({
|
|
6488
6493
|
queryKey: ["fluent-bridge-tx-history", baseUrl, address, pageSize],
|
|
6489
|
-
queryFn: ({ pageParam, signal }) =>
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6494
|
+
queryFn: ({ pageParam, signal }) => {
|
|
6495
|
+
if (!address) throw new Error("useBridgeTxHistoryPages: address is missing");
|
|
6496
|
+
return getBridgeTransactions({
|
|
6497
|
+
baseUrl,
|
|
6498
|
+
address,
|
|
6499
|
+
limit: pageSize,
|
|
6500
|
+
offset: pageParam,
|
|
6501
|
+
signal
|
|
6502
|
+
});
|
|
6503
|
+
},
|
|
6496
6504
|
initialPageParam: 0,
|
|
6497
6505
|
getNextPageParam: (last) => last.has_more ? last.next_offset ?? last.offset + last.limit : void 0,
|
|
6498
6506
|
enabled: Boolean(address),
|
|
@@ -6540,12 +6548,12 @@ var SilentReconnectAdapter = class extends WagmiAdapter {
|
|
|
6540
6548
|
hydration;
|
|
6541
6549
|
reconnection;
|
|
6542
6550
|
hydrate() {
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
}).onMount();
|
|
6551
|
+
this.hydration ??= hydrate(this.wagmiConfig, { reconnectOnMount: false }).onMount();
|
|
6552
|
+
return this.hydration;
|
|
6546
6553
|
}
|
|
6547
6554
|
syncConnections() {
|
|
6548
|
-
|
|
6555
|
+
this.reconnection ??= this.restoreConnections();
|
|
6556
|
+
return this.reconnection;
|
|
6549
6557
|
}
|
|
6550
6558
|
async restoreConnections() {
|
|
6551
6559
|
await this.hydrate();
|
|
@@ -6666,7 +6674,7 @@ function useReownWallet() {
|
|
|
6666
6674
|
() => connectors.filter(
|
|
6667
6675
|
(connector) => (
|
|
6668
6676
|
// The bridge page's picker registers its own wallets here. RainbowKit's mark is read
|
|
6669
|
-
// inline, not through `isBridgeWalletConnector`: `reownAppKit.test.
|
|
6677
|
+
// inline, not through `isBridgeWalletConnector`: `reownAppKit.test.ts` runs this
|
|
6670
6678
|
// hook's source alone, with no import in reach.
|
|
6671
6679
|
!connector.rkDetails?.isRainbowKitConnector && connector.id !== "AUTH" && (connector.id !== "injected" || typeof window !== "undefined" && "ethereum" in window && !connectors.some((other) => other.type === "injected" && other.id !== "injected"))
|
|
6672
6680
|
)
|
|
@@ -6847,63 +6855,157 @@ function DialogDescription({ className, ...props }) {
|
|
|
6847
6855
|
);
|
|
6848
6856
|
}
|
|
6849
6857
|
function Label({ className, ...props }) {
|
|
6850
|
-
return
|
|
6851
|
-
|
|
6852
|
-
{
|
|
6853
|
-
"data-slot": "label",
|
|
6854
|
-
className: cn(
|
|
6855
|
-
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
6856
|
-
className
|
|
6857
|
-
),
|
|
6858
|
-
...props
|
|
6859
|
-
}
|
|
6860
|
-
);
|
|
6861
|
-
}
|
|
6862
|
-
var icons = {
|
|
6863
|
-
google: (props) => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
6864
|
-
/* @__PURE__ */ jsx(
|
|
6865
|
-
"path",
|
|
6866
|
-
{
|
|
6867
|
-
fill: "#4285F4",
|
|
6868
|
-
d: "M21.6 12.23c0-.71-.06-1.39-.18-2.05H12v3.88h5.38a4.6 4.6 0 0 1-2 3.02v2.51h3.24c1.9-1.75 2.98-4.33 2.98-7.36Z"
|
|
6869
|
-
}
|
|
6870
|
-
),
|
|
6871
|
-
/* @__PURE__ */ jsx(
|
|
6872
|
-
"path",
|
|
6873
|
-
{
|
|
6874
|
-
fill: "#34A853",
|
|
6875
|
-
d: "M12 22c2.7 0 4.96-.9 6.62-2.42l-3.24-2.51c-.9.6-2.04.96-3.38.96-2.6 0-4.8-1.76-5.59-4.12H3.07v2.59A10 10 0 0 0 12 22Z"
|
|
6876
|
-
}
|
|
6877
|
-
),
|
|
6878
|
-
/* @__PURE__ */ jsx("path", { fill: "#FBBC05", d: "M6.41 13.91a6 6 0 0 1 0-3.82V7.5H3.07a10 10 0 0 0 0 9l3.34-2.59Z" }),
|
|
6858
|
+
return (
|
|
6859
|
+
// biome-ignore lint/a11y/noLabelWithoutControl: a shared primitive; each caller nests its control or passes htmlFor
|
|
6879
6860
|
/* @__PURE__ */ jsx(
|
|
6880
|
-
"
|
|
6861
|
+
"label",
|
|
6881
6862
|
{
|
|
6882
|
-
|
|
6883
|
-
|
|
6863
|
+
"data-slot": "label",
|
|
6864
|
+
className: cn(
|
|
6865
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
6866
|
+
className
|
|
6867
|
+
),
|
|
6868
|
+
...props
|
|
6884
6869
|
}
|
|
6885
6870
|
)
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6871
|
+
);
|
|
6872
|
+
}
|
|
6873
|
+
var icons = {
|
|
6874
|
+
google: (props) => /* @__PURE__ */ jsxs(
|
|
6875
|
+
"svg",
|
|
6876
|
+
{
|
|
6877
|
+
"aria-hidden": "true",
|
|
6878
|
+
viewBox: "0 0 24 24",
|
|
6879
|
+
fill: "none",
|
|
6880
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6881
|
+
...props,
|
|
6882
|
+
children: [
|
|
6883
|
+
/* @__PURE__ */ jsx(
|
|
6884
|
+
"path",
|
|
6885
|
+
{
|
|
6886
|
+
fill: "#4285F4",
|
|
6887
|
+
d: "M21.6 12.23c0-.71-.06-1.39-.18-2.05H12v3.88h5.38a4.6 4.6 0 0 1-2 3.02v2.51h3.24c1.9-1.75 2.98-4.33 2.98-7.36Z"
|
|
6888
|
+
}
|
|
6889
|
+
),
|
|
6890
|
+
/* @__PURE__ */ jsx(
|
|
6891
|
+
"path",
|
|
6892
|
+
{
|
|
6893
|
+
fill: "#34A853",
|
|
6894
|
+
d: "M12 22c2.7 0 4.96-.9 6.62-2.42l-3.24-2.51c-.9.6-2.04.96-3.38.96-2.6 0-4.8-1.76-5.59-4.12H3.07v2.59A10 10 0 0 0 12 22Z"
|
|
6895
|
+
}
|
|
6896
|
+
),
|
|
6897
|
+
/* @__PURE__ */ jsx("path", { fill: "#FBBC05", d: "M6.41 13.91a6 6 0 0 1 0-3.82V7.5H3.07a10 10 0 0 0 0 9l3.34-2.59Z" }),
|
|
6898
|
+
/* @__PURE__ */ jsx(
|
|
6899
|
+
"path",
|
|
6900
|
+
{
|
|
6901
|
+
fill: "#EA4335",
|
|
6902
|
+
d: "M12 5.97c1.47 0 2.79.5 3.83 1.5l2.87-2.88A9.63 9.63 0 0 0 12 2a10 10 0 0 0-8.93 5.5l3.34 2.59C7.2 7.73 9.4 5.97 12 5.97Z"
|
|
6903
|
+
}
|
|
6904
|
+
)
|
|
6905
|
+
]
|
|
6906
|
+
}
|
|
6907
|
+
),
|
|
6908
|
+
x: (props) => /* @__PURE__ */ jsx(
|
|
6909
|
+
"svg",
|
|
6910
|
+
{
|
|
6911
|
+
"aria-hidden": "true",
|
|
6912
|
+
viewBox: "0 0 24 24",
|
|
6913
|
+
fill: "currentColor",
|
|
6914
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6915
|
+
...props,
|
|
6916
|
+
children: /* @__PURE__ */ jsx("path", { d: "M10.4883 14.651L15.25 21H22.25L14.3917 10.5223L20.9308 3H18.2808L13.1643 8.88578L8.75 3H1.75L9.26086 13.0145L2.31915 21H4.96917L10.4883 14.651ZM16.25 19L5.75 5H7.75L18.25 19H16.25Z" })
|
|
6917
|
+
}
|
|
6918
|
+
),
|
|
6919
|
+
"arrow-right-s-line": (props) => /* @__PURE__ */ jsx(
|
|
6920
|
+
"svg",
|
|
6921
|
+
{
|
|
6922
|
+
"aria-hidden": "true",
|
|
6923
|
+
viewBox: "0 0 24 24",
|
|
6924
|
+
fill: "currentColor",
|
|
6925
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6926
|
+
...props,
|
|
6927
|
+
children: /* @__PURE__ */ jsx("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" })
|
|
6928
|
+
}
|
|
6929
|
+
),
|
|
6930
|
+
"arrow-left-right-line": (props) => /* @__PURE__ */ jsx(
|
|
6931
|
+
"svg",
|
|
6932
|
+
{
|
|
6933
|
+
"aria-hidden": "true",
|
|
6934
|
+
viewBox: "0 0 24 24",
|
|
6935
|
+
fill: "currentColor",
|
|
6936
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6937
|
+
...props,
|
|
6938
|
+
children: /* @__PURE__ */ jsx("path", { d: "M16.0503 12.0498L21 16.9996L16.0503 21.9493L14.636 20.5351L17.172 17.9988L4 17.9996V15.9996L17.172 15.9988L14.636 13.464L16.0503 12.0498ZM7.94975 2.0498L9.36396 3.46402L6.828 5.9988L20 5.99955V7.99955L6.828 7.9988L9.36396 10.5351L7.94975 11.9493L3 6.99955L7.94975 2.0498Z" })
|
|
6939
|
+
}
|
|
6940
|
+
),
|
|
6941
|
+
"arrow-up-down-line": (props) => /* @__PURE__ */ jsx(
|
|
6942
|
+
"svg",
|
|
6943
|
+
{
|
|
6944
|
+
"aria-hidden": "true",
|
|
6945
|
+
viewBox: "0 0 24 24",
|
|
6946
|
+
fill: "currentColor",
|
|
6947
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6948
|
+
...props,
|
|
6949
|
+
children: /* @__PURE__ */ jsx("path", { d: "M11.9498 7.94975L10.5356 9.36396L8.00079 6.828L8.00004 20H6.00004L6.00079 6.828L3.46451 9.36396L2.05029 7.94975L7.00004 3L11.9498 7.94975ZM21.9498 16.0503L17 21L12.0503 16.0503L13.4645 14.636L16.0008 17.172L16 4H18L18.0008 17.172L20.5356 14.636L21.9498 16.0503Z" })
|
|
6950
|
+
}
|
|
6951
|
+
),
|
|
6952
|
+
"arrow-right-up-line": (props) => /* @__PURE__ */ jsx(
|
|
6953
|
+
"svg",
|
|
6954
|
+
{
|
|
6955
|
+
"aria-hidden": "true",
|
|
6956
|
+
viewBox: "0 0 24 24",
|
|
6957
|
+
fill: "currentColor",
|
|
6958
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6959
|
+
...props,
|
|
6960
|
+
children: /* @__PURE__ */ jsx("path", { d: "M16.0037 9.41421L7.39712 18.0208L5.98291 16.6066L14.5895 8H7.00373V6H18.0037V17H16.0037V9.41421Z" })
|
|
6961
|
+
}
|
|
6962
|
+
),
|
|
6963
|
+
"arrow-up-line": (props) => /* @__PURE__ */ jsx(
|
|
6964
|
+
"svg",
|
|
6965
|
+
{
|
|
6966
|
+
"aria-hidden": "true",
|
|
6967
|
+
viewBox: "0 0 24 24",
|
|
6968
|
+
fill: "currentColor",
|
|
6969
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6970
|
+
...props,
|
|
6971
|
+
children: /* @__PURE__ */ jsx("path", { d: "M13 7.82843V20H11V7.82843L5.63604 13.1924L4.22183 11.7782L12 4L19.7782 11.7782L18.364 13.1924L13 7.82843Z" })
|
|
6972
|
+
}
|
|
6973
|
+
),
|
|
6974
|
+
plus: (props) => /* @__PURE__ */ jsx(
|
|
6975
|
+
"svg",
|
|
6976
|
+
{
|
|
6977
|
+
"aria-hidden": "true",
|
|
6978
|
+
viewBox: "0 0 24 24",
|
|
6979
|
+
fill: "currentColor",
|
|
6980
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6981
|
+
...props,
|
|
6982
|
+
children: /* @__PURE__ */ jsx("path", { d: "M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z" })
|
|
6983
|
+
}
|
|
6984
|
+
),
|
|
6985
|
+
eth: (props) => /* @__PURE__ */ jsxs(
|
|
6986
|
+
"svg",
|
|
6987
|
+
{
|
|
6988
|
+
"aria-hidden": "true",
|
|
6989
|
+
viewBox: "0 0 24 24",
|
|
6990
|
+
fill: "currentColor",
|
|
6991
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6992
|
+
...props,
|
|
6993
|
+
children: [
|
|
6994
|
+
/* @__PURE__ */ jsx("path", { d: "M11.944 1.5v7.908l6.722 3.004L11.944 1.5z", opacity: "0.6" }),
|
|
6995
|
+
/* @__PURE__ */ jsx("path", { d: "M11.944 1.5 5.222 12.412l6.722-3.004V1.5z" }),
|
|
6996
|
+
/* @__PURE__ */ jsx("path", { d: "M11.944 16.478v5.999l6.726-9.326-6.726 3.327z", opacity: "0.6" }),
|
|
6997
|
+
/* @__PURE__ */ jsx("path", { d: "M11.944 22.477v-5.999l-6.722-3.327 6.722 9.326z" }),
|
|
6998
|
+
/* @__PURE__ */ jsx("path", { d: "m11.944 15.349 6.722-3.937-6.722-3.003v6.94z", opacity: "0.2" }),
|
|
6999
|
+
/* @__PURE__ */ jsx("path", { d: "m5.222 11.412 6.722 3.937v-6.94l-6.722 3.003z", opacity: "0.6" })
|
|
7000
|
+
]
|
|
7001
|
+
}
|
|
7002
|
+
),
|
|
6902
7003
|
// Circle's USDC mark without its blue disc, which the token tile draws; the
|
|
6903
7004
|
// view box is cropped to the mark so it sizes like the other token glyphs.
|
|
6904
7005
|
usdc: (props) => /* @__PURE__ */ jsxs(
|
|
6905
7006
|
"svg",
|
|
6906
7007
|
{
|
|
7008
|
+
"aria-hidden": "true",
|
|
6907
7009
|
viewBox: "250 250 1500 1500",
|
|
6908
7010
|
fill: "currentColor",
|
|
6909
7011
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6917,6 +7019,7 @@ var icons = {
|
|
|
6917
7019
|
usdnr: (props) => /* @__PURE__ */ jsxs(
|
|
6918
7020
|
"svg",
|
|
6919
7021
|
{
|
|
7022
|
+
"aria-hidden": "true",
|
|
6920
7023
|
viewBox: "0 0 75 75",
|
|
6921
7024
|
fill: "currentColor",
|
|
6922
7025
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6932,6 +7035,7 @@ var icons = {
|
|
|
6932
7035
|
fluent: (props) => /* @__PURE__ */ jsx(
|
|
6933
7036
|
"svg",
|
|
6934
7037
|
{
|
|
7038
|
+
"aria-hidden": "true",
|
|
6935
7039
|
viewBox: "0 0 26 24",
|
|
6936
7040
|
fill: "currentColor",
|
|
6937
7041
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6939,171 +7043,231 @@ var icons = {
|
|
|
6939
7043
|
children: /* @__PURE__ */ jsx("path", { d: "M25.973 3.5405V0H0.0274556V3.5405H11.5738C9.39481 4.86942 7.44796 6.53554 5.79813 8.4595H0V12H3.2797C1.21554 15.5331 0.0274556 19.6314 0.0274556 24H3.59169C3.59169 19.5198 5.05433 15.3719 7.52284 11.9975H14.257C10.7975 14.8364 8.58862 19.1306 8.58862 23.9256H12.1529C12.1529 17.3479 17.5392 11.9975 24.1609 11.9975H25.9431V8.45702H10.815C14.4167 5.39504 19.0867 3.53802 24.1884 3.53802H25.9705L25.973 3.5405Z" })
|
|
6940
7044
|
}
|
|
6941
7045
|
),
|
|
6942
|
-
metaMask: (props) => /* @__PURE__ */ jsxs(
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
"
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
}
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7046
|
+
metaMask: (props) => /* @__PURE__ */ jsxs(
|
|
7047
|
+
"svg",
|
|
7048
|
+
{
|
|
7049
|
+
"aria-hidden": "true",
|
|
7050
|
+
viewBox: "0 0 142 136.878",
|
|
7051
|
+
fill: "none",
|
|
7052
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7053
|
+
...props,
|
|
7054
|
+
children: [
|
|
7055
|
+
/* @__PURE__ */ jsx(
|
|
7056
|
+
"path",
|
|
7057
|
+
{
|
|
7058
|
+
fill: "#FF5C16",
|
|
7059
|
+
d: "M132.682,132.192l-30.583-9.106l-23.063,13.787l-16.092-0.007l-23.077-13.78l-30.569,9.106L0,100.801l9.299-34.839L0,36.507L9.299,0l47.766,28.538h27.85L132.682,0l9.299,36.507l-9.299,29.455l9.299,34.839L132.682,132.192L132.682,132.192z"
|
|
7060
|
+
}
|
|
7061
|
+
),
|
|
7062
|
+
/* @__PURE__ */ jsx(
|
|
7063
|
+
"path",
|
|
7064
|
+
{
|
|
7065
|
+
fill: "#FF5C16",
|
|
7066
|
+
d: "M9.305,0l47.767,28.558l-1.899,19.599L9.305,0z M39.875,100.814l21.017,16.01l-21.017,6.261C39.875,123.085,39.875,100.814,39.875,100.814z M59.212,74.345l-4.039-26.174L29.317,65.97l-0.014-0.007v0.013l0.08,18.321l10.485-9.951L59.212,74.345L59.212,74.345z M132.682,0L84.915,28.558l1.893,19.599L132.682,0z M102.113,100.814l-21.018,16.01l21.018,6.261V100.814z M112.678,65.975h0.007H112.678v-0.013l-0.006,0.007L86.815,48.171l-4.039,26.174h19.336l10.492,9.95C112.604,84.295,112.678,65.975,112.678,65.975z"
|
|
7067
|
+
}
|
|
7068
|
+
),
|
|
7069
|
+
/* @__PURE__ */ jsx(
|
|
7070
|
+
"path",
|
|
7071
|
+
{
|
|
7072
|
+
fill: "#E34807",
|
|
7073
|
+
d: "M39.868,123.085l-30.569,9.106L0,100.814h39.868C39.868,100.814,39.868,123.085,39.868,123.085z M59.205,74.338l5.839,37.84l-8.093-21.04L29.37,84.295l10.491-9.956h19.344L59.205,74.338z M102.112,123.085l30.57,9.106l9.299-31.378h-39.869C102.112,100.814,102.112,123.085,102.112,123.085z M82.776,74.338l-5.839,37.84l8.092-21.04l27.583-6.843l-10.498-9.956H82.776V74.338z"
|
|
7074
|
+
}
|
|
7075
|
+
),
|
|
7076
|
+
/* @__PURE__ */ jsx(
|
|
7077
|
+
"path",
|
|
7078
|
+
{
|
|
7079
|
+
fill: "#FF8D5D",
|
|
7080
|
+
d: "M0,100.801l9.299-34.839h19.997l0.073,18.327l27.584,6.843l8.092,21.039l-4.16,4.633l-21.017-16.01H0V100.801z M141.981,100.801l-9.299-34.839h-19.998l-0.073,18.327l-27.582,6.843l-8.093,21.039l4.159,4.633l21.018-16.01h39.868V100.801z M84.915,28.538h-27.85l-1.891,19.599l9.872,64.013h11.891l9.878-64.013L84.915,28.538z"
|
|
7081
|
+
}
|
|
7082
|
+
),
|
|
7083
|
+
/* @__PURE__ */ jsx(
|
|
7084
|
+
"path",
|
|
7085
|
+
{
|
|
7086
|
+
fill: "#661800",
|
|
7087
|
+
d: "M9.299,0L0,36.507l9.299,29.455h19.997l25.87-17.804L9.299,0z M53.426,81.938h-9.059l-4.932,4.835l17.524,4.344l-3.533-9.186V81.938z M132.682,0l9.299,36.507l-9.299,29.455h-19.998L86.815,48.158L132.682,0z M88.568,81.938h9.072l4.932,4.841l-17.544,4.353l3.54-9.201V81.938z M79.029,124.385l2.067-7.567l-4.16-4.633h-11.9l-4.159,4.633l2.066,7.567"
|
|
7088
|
+
}
|
|
7089
|
+
),
|
|
7090
|
+
/* @__PURE__ */ jsx(
|
|
7091
|
+
"path",
|
|
7092
|
+
{
|
|
7093
|
+
fill: "#C0C4CD",
|
|
7094
|
+
d: "M79.029,124.384v12.495H62.945v-12.495L79.029,124.384L79.029,124.384z"
|
|
7095
|
+
}
|
|
7096
|
+
),
|
|
7097
|
+
/* @__PURE__ */ jsx(
|
|
7098
|
+
"path",
|
|
7099
|
+
{
|
|
7100
|
+
fill: "#E7EBF6",
|
|
7101
|
+
d: "M39.875,123.072l23.083,13.8v-12.495l-2.067-7.566C60.891,116.811,39.875,123.072,39.875,123.072z M102.113,123.072l-23.084,13.8v-12.495l2.067-7.566C81.096,116.811,102.113,123.072,102.113,123.072z"
|
|
7102
|
+
}
|
|
7103
|
+
)
|
|
7104
|
+
]
|
|
7105
|
+
}
|
|
7106
|
+
),
|
|
7107
|
+
coinbase: (props) => /* @__PURE__ */ jsx(
|
|
7108
|
+
"svg",
|
|
7109
|
+
{
|
|
7110
|
+
"aria-hidden": "true",
|
|
7111
|
+
viewBox: "0 0 24 24",
|
|
7112
|
+
fill: "currentColor",
|
|
7113
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7114
|
+
...props,
|
|
7115
|
+
children: /* @__PURE__ */ jsx("path", { d: "M17.1797 10.0983C16.4594 7.8401 14.5619 6.32185 12.1704 6.32185C8.86954 6.32185 6.59258 8.93088 6.59115 12.4744C6.59115 15.9782 8.90534 18.5872 12.2076 18.5872C14.5992 18.5872 16.4966 17.0292 17.1797 14.771H21.9628C21.0892 19.6382 17.1425 22.9091 12.2091 22.9091C6.36489 22.9091 2 18.4708 2 12.4744C2 6.4781 6.47802 2 12.2091 2C17.2556 2 21.1265 5.27087 22 10.0983H17.1797Z" })
|
|
7116
|
+
}
|
|
7117
|
+
),
|
|
7118
|
+
walletConnect: (props) => /* @__PURE__ */ jsx(
|
|
7119
|
+
"svg",
|
|
7120
|
+
{
|
|
7121
|
+
"aria-hidden": "true",
|
|
7122
|
+
viewBox: "0 0 24 24",
|
|
7123
|
+
fill: "currentColor",
|
|
7124
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7125
|
+
...props,
|
|
7126
|
+
children: /* @__PURE__ */ jsx("path", { d: "M4.91462 7.9107C8.82902 4.02977 15.1737 4.02977 19.0881 7.9107L19.5585 8.37904C19.7531 8.5735 19.7531 8.88846 19.5585 9.08292L17.9473 10.6797C17.85 10.7755 17.6905 10.7755 17.5932 10.6797L16.9444 10.036C14.214 7.33007 9.78599 7.33007 7.05564 10.036L6.36089 10.7235C6.26357 10.8193 6.10408 10.8193 6.00676 10.7235L4.39558 9.12674C4.20095 8.93228 4.20095 8.61732 4.39558 8.42286L4.91192 7.9107H4.91462ZM22.4213 11.2137L23.854 12.6352C24.0487 12.8297 24.0487 13.1446 23.854 13.3391L17.3877 19.7507C17.1931 19.9452 16.8741 19.9452 16.6794 19.7507L12.0892 15.2015C12.0406 15.1522 11.9622 15.1522 11.9108 15.2015L7.32057 19.7507C7.12593 19.9452 6.80694 19.9452 6.6123 19.7507L0.145979 13.3391C-0.0486596 13.1446 -0.0486596 12.8297 0.145979 12.6352L1.57873 11.2137C1.77337 11.0193 2.09236 11.0193 2.287 11.2137L6.87723 15.763C6.92588 15.8123 7.00428 15.8123 7.05564 15.763L11.6459 11.2137C11.8405 11.0193 12.1595 11.0193 12.3541 11.2137L16.9444 15.7657C16.993 15.815 17.0714 15.815 17.1228 15.7657L21.713 11.2165C21.9076 11.022 22.2266 11.022 22.4213 11.2165V11.2137Z" })
|
|
7127
|
+
}
|
|
7128
|
+
),
|
|
7129
|
+
okx: (props) => /* @__PURE__ */ jsx(
|
|
7130
|
+
"svg",
|
|
7131
|
+
{
|
|
7132
|
+
"aria-hidden": "true",
|
|
7133
|
+
viewBox: "0 0 24 24",
|
|
7134
|
+
fill: "currentColor",
|
|
7135
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7136
|
+
...props,
|
|
7137
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 3h6v6H3zm12 6H9v6H3v6h6v-6h6v6h6v-6h-6zm0 0V3h6v6z" })
|
|
7138
|
+
}
|
|
7139
|
+
),
|
|
7140
|
+
keplr: (props) => /* @__PURE__ */ jsxs(
|
|
7141
|
+
"svg",
|
|
7142
|
+
{
|
|
7143
|
+
"aria-hidden": "true",
|
|
7144
|
+
viewBox: "0 0 24 24",
|
|
7145
|
+
fill: "currentColor",
|
|
7146
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7147
|
+
...props,
|
|
7148
|
+
children: [
|
|
7149
|
+
/* @__PURE__ */ jsx("path", { d: "M12.48 7.922c.13 1.336.196 2.004.546 2.494.15.21.336.393.547.54.495.343 1.164.4 2.502.512l.566.048v.968l-.566.048c-1.338.112-2.007.169-2.501.512-.212.147-.397.33-.548.54-.35.49-.415 1.158-.546 2.494h-.96c-.13-1.336-.196-2.004-.546-2.494a2.3 2.3 0 0 0-.547-.54c-.495-.343-1.164-.4-2.502-.512l-.566-.048v-.968l.566-.048c1.338-.112 2.007-.169 2.502-.512a2.3 2.3 0 0 0 .547-.54c.35-.49.415-1.158.546-2.494z" }),
|
|
7150
|
+
/* @__PURE__ */ jsx(
|
|
7151
|
+
"path",
|
|
7152
|
+
{
|
|
7153
|
+
fillRule: "evenodd",
|
|
7154
|
+
d: "M12 3c7.411 0 9 1.588 9 9 0 7.411-1.589 9-9 9s-9-1.589-9-9 1.588-9 9-9m5.882 3.11C15.702 3.93 11.3 4.8 8.05 8.05s-4.12 7.652-1.94 9.832 6.582 1.312 9.833-1.939c3.25-3.25 4.119-7.653 1.94-9.833",
|
|
7155
|
+
clipRule: "evenodd"
|
|
7156
|
+
}
|
|
7157
|
+
)
|
|
7158
|
+
]
|
|
7159
|
+
}
|
|
7160
|
+
),
|
|
7161
|
+
rabby: (props) => /* @__PURE__ */ jsxs(
|
|
7162
|
+
"svg",
|
|
7163
|
+
{
|
|
7164
|
+
"aria-hidden": "true",
|
|
7165
|
+
viewBox: "0 0 24 24",
|
|
7166
|
+
fill: "none",
|
|
7167
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7168
|
+
...props,
|
|
7169
|
+
children: [
|
|
7170
|
+
/* @__PURE__ */ jsx(
|
|
7171
|
+
"path",
|
|
7172
|
+
{
|
|
7173
|
+
fill: "url(#rabby__a)",
|
|
7174
|
+
d: "M20.908 13.17c.707-1.644-2.788-6.235-6.127-8.148-2.105-1.482-4.298-1.279-4.742-.628-.975 1.428 3.228 2.638 6.038 4.05a3.25 3.25 0 0 0-1.508 1.39c-1.048-1.19-3.348-2.216-6.046-1.39-1.819.556-3.33 1.868-3.914 3.85a1.1 1.1 0 0 0-.464-.103c-.632 0-1.145.533-1.145 1.191s.513 1.191 1.145 1.191c.117 0 .483-.081.483-.081l5.855.044c-2.341 3.865-4.192 4.43-4.192 5.1s1.77.488 2.436.238c3.182-1.195 6.6-4.919 7.187-5.99 2.463.32 4.533.357 4.994-.715"
|
|
7175
|
+
}
|
|
7176
|
+
),
|
|
7177
|
+
/* @__PURE__ */ jsx(
|
|
7178
|
+
"path",
|
|
7179
|
+
{
|
|
7180
|
+
fill: "url(#rabby__b)",
|
|
7181
|
+
fillRule: "evenodd",
|
|
7182
|
+
d: "M16.077 8.444c.13-.053.11-.253.074-.41-.082-.362-1.5-1.82-2.833-2.473-1.815-.89-3.152-.843-3.35-.433.37.788 2.085 1.529 3.875 2.302.764.33 1.541.666 2.234 1.014",
|
|
7183
|
+
clipRule: "evenodd"
|
|
7184
|
+
}
|
|
7185
|
+
),
|
|
7186
|
+
/* @__PURE__ */ jsx(
|
|
7187
|
+
"path",
|
|
7188
|
+
{
|
|
7189
|
+
fill: "url(#rabby__c)",
|
|
7190
|
+
fillRule: "evenodd",
|
|
7191
|
+
d: "M13.774 16.38c-.368-.145-.782-.28-1.254-.4.503-.937.609-2.322.134-3.199-.666-1.229-1.503-1.883-3.446-1.883-1.07 0-3.947.374-3.998 2.874q-.009.393.018.724l5.255.04a18.7 18.7 0 0 1-1.953 2.696c.698.186 1.273.342 1.802.486.501.136.96.26 1.44.388a22 22 0 0 0 2.002-1.725",
|
|
7192
|
+
clipRule: "evenodd"
|
|
7193
|
+
}
|
|
7194
|
+
),
|
|
7195
|
+
/* @__PURE__ */ jsx(
|
|
7196
|
+
"path",
|
|
7197
|
+
{
|
|
7198
|
+
fill: "url(#rabby__d)",
|
|
7199
|
+
d: "M4.539 14.24c.215 1.898 1.252 2.643 3.371 2.863 2.12.22 3.335.072 4.954.225 1.352.128 2.559.845 3.006.598.403-.223.178-1.029-.361-1.545-.7-.67-1.667-1.136-3.369-1.301.34-.967.244-2.322-.282-3.06-.762-1.065-2.168-1.547-3.948-1.337-1.86.22-3.64 1.173-3.371 3.556"
|
|
7200
|
+
}
|
|
7201
|
+
),
|
|
7202
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
7203
|
+
/* @__PURE__ */ jsxs(
|
|
7204
|
+
"linearGradient",
|
|
7205
|
+
{
|
|
7206
|
+
id: "rabby__a",
|
|
7207
|
+
x1: "8.311",
|
|
7208
|
+
x2: "20.827",
|
|
7209
|
+
y1: "11.714",
|
|
7210
|
+
y2: "15.125",
|
|
7211
|
+
gradientUnits: "userSpaceOnUse",
|
|
7212
|
+
children: [
|
|
7213
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#fff" }),
|
|
7214
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#fff" })
|
|
7215
|
+
]
|
|
7216
|
+
}
|
|
7217
|
+
),
|
|
7218
|
+
/* @__PURE__ */ jsxs(
|
|
7219
|
+
"linearGradient",
|
|
7220
|
+
{
|
|
7221
|
+
id: "rabby__b",
|
|
7222
|
+
x1: "18.66",
|
|
7223
|
+
x2: "9.323",
|
|
7224
|
+
y1: "11.468",
|
|
7225
|
+
y2: "2.473",
|
|
7226
|
+
gradientUnits: "userSpaceOnUse",
|
|
7227
|
+
children: [
|
|
7228
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#8697FF" }),
|
|
7229
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
7230
|
+
]
|
|
7231
|
+
}
|
|
7232
|
+
),
|
|
7233
|
+
/* @__PURE__ */ jsxs(
|
|
7234
|
+
"linearGradient",
|
|
7235
|
+
{
|
|
7236
|
+
id: "rabby__c",
|
|
7237
|
+
x1: "14.023",
|
|
7238
|
+
x2: "5.231",
|
|
7239
|
+
y1: "16.707",
|
|
7240
|
+
y2: "11.849",
|
|
7241
|
+
gradientUnits: "userSpaceOnUse",
|
|
7242
|
+
children: [
|
|
7243
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#8697FF" }),
|
|
7244
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
7245
|
+
]
|
|
7246
|
+
}
|
|
7247
|
+
),
|
|
7248
|
+
/* @__PURE__ */ jsxs(
|
|
7249
|
+
"linearGradient",
|
|
7250
|
+
{
|
|
7251
|
+
id: "rabby__d",
|
|
7252
|
+
x1: "9.054",
|
|
7253
|
+
x2: "15.173",
|
|
7254
|
+
y1: "11.617",
|
|
7255
|
+
y2: "19.089",
|
|
7256
|
+
gradientUnits: "userSpaceOnUse",
|
|
7257
|
+
children: [
|
|
7258
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#fff" }),
|
|
7259
|
+
/* @__PURE__ */ jsx("stop", { offset: ".984", stopColor: "#D1D8FF" })
|
|
7260
|
+
]
|
|
7261
|
+
}
|
|
7262
|
+
)
|
|
7263
|
+
] })
|
|
7264
|
+
]
|
|
7265
|
+
}
|
|
7266
|
+
)
|
|
7103
7267
|
};
|
|
7104
7268
|
function Icon({ name, className, ...props }) {
|
|
7105
7269
|
const Render = icons[name];
|
|
7106
|
-
return /* @__PURE__ */ jsx(Render, { className: cn(className),
|
|
7270
|
+
return /* @__PURE__ */ jsx(Render, { className: cn(className), ...props });
|
|
7107
7271
|
}
|
|
7108
7272
|
|
|
7109
7273
|
// src/assets/brand/wordmark-connect.png
|
|
@@ -7546,11 +7710,10 @@ function InlineConnectModal(props) {
|
|
|
7546
7710
|
] }),
|
|
7547
7711
|
/* @__PURE__ */ jsx(BranchDivider, {}),
|
|
7548
7712
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 px-5", children: showWallets ? /* @__PURE__ */ jsxs(
|
|
7549
|
-
"
|
|
7713
|
+
"fieldset",
|
|
7550
7714
|
{
|
|
7551
|
-
className: "flex flex-col gap-2 animate-in fade-in-0 slide-in-from-bottom-1 duration-200 motion-reduce:animate-none",
|
|
7715
|
+
className: "m-0 flex min-w-auto flex-col gap-2 border-0 p-0 animate-in fade-in-0 slide-in-from-bottom-1 duration-200 motion-reduce:animate-none",
|
|
7552
7716
|
ref: walletList,
|
|
7553
|
-
role: "group",
|
|
7554
7717
|
"aria-label": "Connect with other wallets",
|
|
7555
7718
|
children: [
|
|
7556
7719
|
wallet?.choices?.length ? wallet.choices.map((choice) => /* @__PURE__ */ jsxs(
|
|
@@ -8466,7 +8629,7 @@ function depositSwapCopy(state, slow, route) {
|
|
|
8466
8629
|
case "error":
|
|
8467
8630
|
return {
|
|
8468
8631
|
heading: "The swap did not go through",
|
|
8469
|
-
detail: `Your ${state.leg.from.symbol} is on Fluent \u2014 only the swap failed.
|
|
8632
|
+
detail: `Your ${state.leg.from.symbol} is on Fluent \u2014 only the swap failed. ${state.message}`
|
|
8470
8633
|
};
|
|
8471
8634
|
case "unconfirmed":
|
|
8472
8635
|
return { heading: "The swap's outcome is not known yet", detail: state.message };
|
|
@@ -8827,7 +8990,10 @@ function useHyperlaneTransfers({
|
|
|
8827
8990
|
}) {
|
|
8828
8991
|
return useQuery({
|
|
8829
8992
|
queryKey: ["fluent-bridge-hyperlane-history", route.source.id, route.destination.id, address],
|
|
8830
|
-
queryFn: ({ signal }) =>
|
|
8993
|
+
queryFn: ({ signal }) => {
|
|
8994
|
+
if (!address) throw new Error("useHyperlaneTransfers: address is missing");
|
|
8995
|
+
return getHyperlaneTransfers({ address, route, token, signal });
|
|
8996
|
+
},
|
|
8831
8997
|
enabled: Boolean(address),
|
|
8832
8998
|
staleTime: 15e3,
|
|
8833
8999
|
refetchInterval
|
|
@@ -9056,7 +9222,13 @@ function useOrderDepositHistory({
|
|
|
9056
9222
|
const destinationChainId = route.destination.id;
|
|
9057
9223
|
const list = useQuery({
|
|
9058
9224
|
queryKey: ["fluent-order-deposits", baseUrl, originChainId, address],
|
|
9059
|
-
queryFn: ({ signal }) =>
|
|
9225
|
+
queryFn: ({ signal }) => {
|
|
9226
|
+
if (!address || !baseUrl) {
|
|
9227
|
+
const missing = !address ? "address" : "route.orderApiUrl";
|
|
9228
|
+
throw new Error(`useOrderDepositHistory: ${missing} is missing`);
|
|
9229
|
+
}
|
|
9230
|
+
return getOrderDeposits({ baseUrl, sender: address, originChainId, signal });
|
|
9231
|
+
},
|
|
9060
9232
|
enabled: Boolean(address && baseUrl),
|
|
9061
9233
|
staleTime: 15e3,
|
|
9062
9234
|
refetchInterval: (query) => query.state.status === "error" ? false : refetchInterval,
|
|
@@ -9071,7 +9243,8 @@ function useOrderDepositHistory({
|
|
|
9071
9243
|
[orders]
|
|
9072
9244
|
);
|
|
9073
9245
|
const fillHashes = useQueries({
|
|
9074
|
-
|
|
9246
|
+
// Without an order API the list is never read, so there is no filled order to look up.
|
|
9247
|
+
queries: !baseUrl ? [] : filled.map((order) => ({
|
|
9075
9248
|
queryKey: ["fluent-order-deposit-fill", baseUrl, originChainId, order.orderId],
|
|
9076
9249
|
queryFn: async ({ signal }) => {
|
|
9077
9250
|
const read = await getOrderDeposit({
|
|
@@ -9471,7 +9644,7 @@ function ActivityGhost({ shape, live }) {
|
|
|
9471
9644
|
"div",
|
|
9472
9645
|
{
|
|
9473
9646
|
className: "flex flex-col gap-2.5",
|
|
9474
|
-
role:
|
|
9647
|
+
role: "status",
|
|
9475
9648
|
"aria-label": index === 0 ? "Loading activity" : void 0,
|
|
9476
9649
|
children: [
|
|
9477
9650
|
index === 0 && firstLiveDay ? /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: dayFormat.format(firstLiveDay) }) : (
|
|
@@ -9480,7 +9653,10 @@ function ActivityGhost({ shape, live }) {
|
|
|
9480
9653
|
),
|
|
9481
9654
|
/* @__PURE__ */ jsxs("ul", { className: "flex flex-col gap-1 bg-white/5 rounded-2xl p-1", children: [
|
|
9482
9655
|
liveHere.map((item) => /* @__PURE__ */ jsx(Fragment$1, { children: item.node }, item.id)),
|
|
9483
|
-
Array.from({ length: Math.max(count - liveHere.length, 0) }, (_, row) =>
|
|
9656
|
+
Array.from({ length: Math.max(count - liveHere.length, 0) }, (_, row) => (
|
|
9657
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: ghost rows are identical placeholders that never reorder
|
|
9658
|
+
/* @__PURE__ */ jsx("li", { "aria-hidden": true, children: /* @__PURE__ */ jsx(GhostRow, {}) }, row)
|
|
9659
|
+
))
|
|
9484
9660
|
] })
|
|
9485
9661
|
]
|
|
9486
9662
|
},
|
|
@@ -9549,14 +9725,16 @@ function DepositSwapActivityRow({
|
|
|
9549
9725
|
}) {
|
|
9550
9726
|
const leg = "leg" in state ? state.leg : void 0;
|
|
9551
9727
|
const deposit = "deposit" in state ? state.deposit : void 0;
|
|
9552
|
-
const from = leg
|
|
9553
|
-
const to = leg?.to ?? deposit.to;
|
|
9728
|
+
const { from, to } = "leg" in state ? state.leg : state.deposit;
|
|
9554
9729
|
const startedAt = deposit?.startedAt ?? leg?.deposit?.startedAt;
|
|
9555
9730
|
const { title, busy } = depositSwapRowTitle(state);
|
|
9556
9731
|
const failed = state.phase === "bridge_failed" || state.phase === "error";
|
|
9557
9732
|
const status = failed ? "failed" : "confirmed";
|
|
9558
9733
|
const received = leg?.to.amount === void 0 ? void 0 : formatUnits(leg.to.amount, leg.to.decimals);
|
|
9559
|
-
const paid = formatUnits(
|
|
9734
|
+
const paid = formatUnits(
|
|
9735
|
+
"leg" in state ? state.leg.from.amount : state.deposit.expected,
|
|
9736
|
+
from.decimals
|
|
9737
|
+
);
|
|
9560
9738
|
const usd = received ? formatActivityUsd(received, priceOf({ symbol: to.symbol })) : formatActivityUsd(paid, priceOf({ symbol: from.symbol }));
|
|
9561
9739
|
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
9562
9740
|
"button",
|
|
@@ -9877,7 +10055,9 @@ function FluentActivityDetail({
|
|
|
9877
10055
|
const headed = swap ? swap.received : headline ? [headline] : [];
|
|
9878
10056
|
const alsoMoved = headline ? movements.filter((movement) => movement !== headline) : [];
|
|
9879
10057
|
const heading = headed.length > 0 ? /* @__PURE__ */ jsx("span", { title: headed.map((movement) => `${movement.amount} ${movement.symbol}`).join(", "), children: headed.map(formatFluentTransactionAmount).join(", ") }) : FLUENT_TRANSACTION_OPERATION_LABEL;
|
|
9880
|
-
const
|
|
10058
|
+
const onlyPaid = swap?.paid.length === 1 ? swap.paid[0] : void 0;
|
|
10059
|
+
const onlyReceived = swap?.received.length === 1 ? swap.received[0] : void 0;
|
|
10060
|
+
const rate = onlyPaid && onlyReceived ? formatSwapRate(onlyPaid, onlyReceived) : void 0;
|
|
9881
10061
|
const openExplorer = explorerOpener(track);
|
|
9882
10062
|
const transactionHash = entry.kind === "operation" ? entry.transactionHash : entry.hash;
|
|
9883
10063
|
const accountCell = /* @__PURE__ */ jsx("span", { title: account, children: formatAddress(account) });
|
|
@@ -10112,15 +10292,17 @@ function DepositSwapActivityDetail({
|
|
|
10112
10292
|
if (state.phase === "idle" || !route) return null;
|
|
10113
10293
|
const leg = "leg" in state ? state.leg : void 0;
|
|
10114
10294
|
const deposit = state.phase === "bridging" || state.phase === "bridge_failed" ? state.deposit : void 0;
|
|
10115
|
-
const from = leg
|
|
10116
|
-
const to = leg?.to ?? deposit.to;
|
|
10295
|
+
const { from, to } = "leg" in state ? state.leg : state.deposit;
|
|
10117
10296
|
const sentHash = deposit?.sentHash ?? leg?.deposit?.sentHash;
|
|
10118
10297
|
const startedAt = deposit?.startedAt ?? leg?.deposit?.startedAt;
|
|
10119
10298
|
const paid = {
|
|
10120
10299
|
id: "paid",
|
|
10121
10300
|
direction: "sent",
|
|
10122
10301
|
symbol: from.symbol,
|
|
10123
|
-
amount: formatUnits(
|
|
10302
|
+
amount: formatUnits(
|
|
10303
|
+
"leg" in state ? state.leg.from.amount : state.deposit.expected,
|
|
10304
|
+
from.decimals
|
|
10305
|
+
)
|
|
10124
10306
|
};
|
|
10125
10307
|
const received = leg?.to.amount === void 0 ? void 0 : {
|
|
10126
10308
|
id: "received",
|
|
@@ -11015,7 +11197,7 @@ function SendTokenForm({
|
|
|
11015
11197
|
}
|
|
11016
11198
|
);
|
|
11017
11199
|
}
|
|
11018
|
-
return /* @__PURE__ */ jsxs("
|
|
11200
|
+
return /* @__PURE__ */ jsxs("section", { className: "flex w-full flex-1 flex-col gap-4", "aria-label": "Send tokens", children: [
|
|
11019
11201
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
11020
11202
|
/* @__PURE__ */ jsxs(AmountCard, { label: "Send", children: [
|
|
11021
11203
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-5", children: [
|
|
@@ -11284,12 +11466,11 @@ function Field({
|
|
|
11284
11466
|
...props
|
|
11285
11467
|
}) {
|
|
11286
11468
|
return /* @__PURE__ */ jsx(
|
|
11287
|
-
"
|
|
11469
|
+
"fieldset",
|
|
11288
11470
|
{
|
|
11289
|
-
role: "group",
|
|
11290
11471
|
"data-slot": "field",
|
|
11291
11472
|
"data-orientation": orientation,
|
|
11292
|
-
className: cn(fieldVariants({ orientation }), className),
|
|
11473
|
+
className: cn("m-0 min-w-auto border-0 p-0", fieldVariants({ orientation }), className),
|
|
11293
11474
|
...props
|
|
11294
11475
|
}
|
|
11295
11476
|
);
|
|
@@ -12318,7 +12499,7 @@ function AddTokenForm({
|
|
|
12318
12499
|
setAddError("This token could not be added.");
|
|
12319
12500
|
}
|
|
12320
12501
|
};
|
|
12321
|
-
return /* @__PURE__ */ jsxs("
|
|
12502
|
+
return /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-3 rounded-xl bg-white/5 p-3", "aria-label": "Add a token", children: [
|
|
12322
12503
|
/* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
12323
12504
|
"Paste the token's contract address on ",
|
|
12324
12505
|
chain.name,
|
|
@@ -12431,187 +12612,194 @@ function WalletMenuTokenList({
|
|
|
12431
12612
|
}),
|
|
12432
12613
|
[balanceByIdentity, tokens]
|
|
12433
12614
|
);
|
|
12434
|
-
return /* @__PURE__ */ jsx(TooltipProvider, { delay: 200, children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ jsxs(
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
// Rendered as an <img>, never inlined: a logo URL is data from an App or
|
|
12455
|
-
// a stranger's contract, and inlining SVG from either would execute their
|
|
12456
|
-
// markup in the widget.
|
|
12457
|
-
/* @__PURE__ */ jsx(
|
|
12458
|
-
"img",
|
|
12459
|
-
{
|
|
12460
|
-
src: token.logoURI,
|
|
12461
|
-
alt: "",
|
|
12462
|
-
"aria-hidden": "true",
|
|
12463
|
-
loading: "lazy",
|
|
12464
|
-
decoding: "async",
|
|
12465
|
-
className: "size-10 object-contain"
|
|
12466
|
-
}
|
|
12467
|
-
)
|
|
12468
|
-
) : /* @__PURE__ */ jsx("span", { className: "text-xs font-medium", children: symbol.slice(0, 1) })
|
|
12469
|
-
}
|
|
12470
|
-
),
|
|
12471
|
-
/* @__PURE__ */ jsx(ChainBadge, { chain: "l2_to_l1", surface: "row" })
|
|
12472
|
-
] }),
|
|
12473
|
-
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col items-start gap-0.5", children: [
|
|
12474
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-sm font-medium leading-4", children: [
|
|
12475
|
-
symbol,
|
|
12476
|
-
active && /* @__PURE__ */ jsx("span", { className: "rounded-md bg-foreground/15 px-1.5 leading-[18px] text-[10px] font-normal text-muted-foreground -my-px", children: "Gas" }),
|
|
12477
|
-
token.source === "user" && /* @__PURE__ */ jsx("span", { className: "rounded-md bg-foreground/15 px-1.5 leading-[18px] text-[10px] font-normal text-muted-foreground -my-px", children: "Added by you" }),
|
|
12478
|
-
collidingSymbols.has(symbol.toLowerCase()) && /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
12615
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { delay: 200, children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ jsxs(
|
|
12616
|
+
"section",
|
|
12617
|
+
{
|
|
12618
|
+
className: "flex flex-col gap-1 rounded-2xl bg-white/5 p-1",
|
|
12619
|
+
"aria-label": "Token balances",
|
|
12620
|
+
children: [
|
|
12621
|
+
sortedRows.map(({ token, balance }) => {
|
|
12622
|
+
const identity = token.identity;
|
|
12623
|
+
const symbol = token.symbol;
|
|
12624
|
+
const unavailable = balance?.status === "not-configured";
|
|
12625
|
+
const failed = balance?.status === "error";
|
|
12626
|
+
const visual = isFluentDefaultToken(token) ? VISUAL_BY_DEFAULT_SYMBOL[token.symbol] : void 0;
|
|
12627
|
+
const active = selectedSymbol === symbol && gasTokenIdentities.has(identity);
|
|
12628
|
+
const refreshing = busy && Boolean(accountAddress);
|
|
12629
|
+
const fractionDigits = fluentAmountFractionDigits(token.symbol);
|
|
12630
|
+
const formatted = balance?.status === "ready" ? formatFluentGasTokenBalance(balance, fractionDigits) ?? (balance.formatted ? formatFluentLocaleAmount(balance.formatted, fractionDigits) : null) : null;
|
|
12631
|
+
const usdValueLabel = formatTokenUsdValue(balance, usdPrices[identity]);
|
|
12632
|
+
const exactBalance = balance?.status === "ready" && balance.formatted?.includes(".") ? balance.formatted : null;
|
|
12633
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center gap-3 rounded-xl p-2.5", children: [
|
|
12634
|
+
/* @__PURE__ */ jsxs("span", { className: "relative shrink-0", children: [
|
|
12479
12635
|
/* @__PURE__ */ jsx(
|
|
12480
|
-
|
|
12636
|
+
"span",
|
|
12637
|
+
{
|
|
12638
|
+
className: `flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full ${visual?.bgClassName ?? "bg-foreground/10"}`,
|
|
12639
|
+
children: visual ? /* @__PURE__ */ jsx(Icon, { name: visual.icon, className: visual.iconClassName }) : token.logoURI ? (
|
|
12640
|
+
// Rendered as an <img>, never inlined: a logo URL is data from an App or
|
|
12641
|
+
// a stranger's contract, and inlining SVG from either would execute their
|
|
12642
|
+
// markup in the widget.
|
|
12643
|
+
/* @__PURE__ */ jsx(
|
|
12644
|
+
"img",
|
|
12645
|
+
{
|
|
12646
|
+
src: token.logoURI,
|
|
12647
|
+
alt: "",
|
|
12648
|
+
"aria-hidden": "true",
|
|
12649
|
+
loading: "lazy",
|
|
12650
|
+
decoding: "async",
|
|
12651
|
+
className: "size-10 object-contain"
|
|
12652
|
+
}
|
|
12653
|
+
)
|
|
12654
|
+
) : /* @__PURE__ */ jsx("span", { className: "text-xs font-medium", children: symbol.slice(0, 1) })
|
|
12655
|
+
}
|
|
12656
|
+
),
|
|
12657
|
+
/* @__PURE__ */ jsx(ChainBadge, { chain: "l2_to_l1", surface: "row" })
|
|
12658
|
+
] }),
|
|
12659
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col items-start gap-0.5", children: [
|
|
12660
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-sm font-medium leading-4", children: [
|
|
12661
|
+
symbol,
|
|
12662
|
+
active && /* @__PURE__ */ jsx("span", { className: "rounded-md bg-foreground/15 px-1.5 leading-[18px] text-[10px] font-normal text-muted-foreground -my-px", children: "Gas" }),
|
|
12663
|
+
token.source === "user" && /* @__PURE__ */ jsx("span", { className: "rounded-md bg-foreground/15 px-1.5 leading-[18px] text-[10px] font-normal text-muted-foreground -my-px", children: "Added by you" }),
|
|
12664
|
+
collidingSymbols.has(symbol.toLowerCase()) && /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
12665
|
+
/* @__PURE__ */ jsx(
|
|
12666
|
+
TooltipTrigger,
|
|
12667
|
+
{
|
|
12668
|
+
tabIndex: 0,
|
|
12669
|
+
"aria-label": `More than one token on this list calls itself ${symbol}`,
|
|
12670
|
+
render: /* @__PURE__ */ jsx("span", { className: "cursor-default rounded-sm" }),
|
|
12671
|
+
children: /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3.5 text-destructive" })
|
|
12672
|
+
}
|
|
12673
|
+
),
|
|
12674
|
+
/* @__PURE__ */ jsxs(TooltipContent, { children: [
|
|
12675
|
+
"More than one token here calls itself ",
|
|
12676
|
+
symbol,
|
|
12677
|
+
". Check the address."
|
|
12678
|
+
] })
|
|
12679
|
+
] })
|
|
12680
|
+
] }),
|
|
12681
|
+
token.address ? /* @__PURE__ */ jsxs(
|
|
12682
|
+
Select,
|
|
12481
12683
|
{
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
|
|
12485
|
-
|
|
12684
|
+
value: null,
|
|
12685
|
+
onValueChange: (value) => {
|
|
12686
|
+
if (value === "copy" && token.address) {
|
|
12687
|
+
copyAddressToClipboard(token.address);
|
|
12688
|
+
}
|
|
12689
|
+
if (value === "remove" && token.address) {
|
|
12690
|
+
void onRemoveUserToken?.({
|
|
12691
|
+
chainId: token.chainId,
|
|
12692
|
+
address: token.address
|
|
12693
|
+
});
|
|
12694
|
+
}
|
|
12695
|
+
},
|
|
12696
|
+
children: [
|
|
12697
|
+
/* @__PURE__ */ jsx(
|
|
12698
|
+
SelectTrigger,
|
|
12699
|
+
{
|
|
12700
|
+
"aria-label": `Token address actions for ${symbol}`,
|
|
12701
|
+
className: "!h-auto max-w-full gap-0.5 border-0 bg-transparent p-0 text-sm leading-4 opacity-100 shadow-none hover:opacity-80 dark:bg-transparent dark:hover:bg-transparent [&_svg]:size-3 [&_svg]:opacity-0 hover:[&_svg]:opacity-70 aria-expanded:opacity-80 aria-expanded:[&_svg]:opacity-70",
|
|
12702
|
+
children: /* @__PURE__ */ jsx("span", { className: "truncate", children: formatAddress(token.address) })
|
|
12703
|
+
}
|
|
12704
|
+
),
|
|
12705
|
+
/* @__PURE__ */ jsxs(SelectContent, { align: "start", alignItemWithTrigger: false, children: [
|
|
12706
|
+
/* @__PURE__ */ jsxs(SelectItem, { value: "copy", children: [
|
|
12707
|
+
/* @__PURE__ */ jsx(Copy, { className: "size-4" }),
|
|
12708
|
+
"Copy address"
|
|
12709
|
+
] }),
|
|
12710
|
+
token.source === "user" && onRemoveUserToken && !actionsDisabled ? /* @__PURE__ */ jsxs(SelectItem, { value: "remove", children: [
|
|
12711
|
+
/* @__PURE__ */ jsx(Trash2, { className: "size-4" }),
|
|
12712
|
+
"Remove token"
|
|
12713
|
+
] }) : null
|
|
12714
|
+
] })
|
|
12715
|
+
]
|
|
12486
12716
|
}
|
|
12487
|
-
),
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12717
|
+
) : /* @__PURE__ */ jsx("span", { className: "shrink-0 text-sm leading-4 text-muted-foreground", children: isFluentNativeToken(token) ? "Native" : "No address" })
|
|
12718
|
+
] }),
|
|
12719
|
+
refreshing ? (
|
|
12720
|
+
// A ghost of both lines while balances load or reload: the old
|
|
12721
|
+
// figures would read as current, and a blank would read as zero.
|
|
12722
|
+
/* @__PURE__ */ jsxs(
|
|
12723
|
+
"span",
|
|
12724
|
+
{
|
|
12725
|
+
className: "flex flex-col items-end gap-0.5",
|
|
12726
|
+
role: "status",
|
|
12727
|
+
"aria-label": `Loading ${symbol} balance`,
|
|
12728
|
+
children: [
|
|
12729
|
+
/* @__PURE__ */ jsx("span", { className: "h-4 w-14 animate-pulse rounded-md bg-foreground/10" }),
|
|
12730
|
+
/* @__PURE__ */ jsx("span", { className: "h-4 w-10 animate-pulse rounded-md bg-foreground/[0.06]" })
|
|
12731
|
+
]
|
|
12502
12732
|
}
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12733
|
+
)
|
|
12734
|
+
) : /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-end gap-0.5 tabular-nums", children: [
|
|
12735
|
+
usdValueLabel ? /* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-4", children: usdValueLabel }) : null,
|
|
12736
|
+
/* @__PURE__ */ jsx(
|
|
12737
|
+
"span",
|
|
12738
|
+
{
|
|
12739
|
+
className: cn(
|
|
12740
|
+
"text-sm leading-4",
|
|
12741
|
+
usdValueLabel ? "text-muted-foreground" : "font-medium"
|
|
12742
|
+
),
|
|
12743
|
+
children: exactBalance ? /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
12744
|
+
/* @__PURE__ */ jsx(
|
|
12745
|
+
TooltipTrigger,
|
|
12746
|
+
{
|
|
12747
|
+
tabIndex: 0,
|
|
12748
|
+
"aria-label": `${symbol} balance: ${exactBalance}`,
|
|
12749
|
+
render: /* @__PURE__ */ jsx("span", { className: "cursor-default rounded-sm" }),
|
|
12750
|
+
children: renderBalanceLabel({
|
|
12751
|
+
formatted,
|
|
12752
|
+
unavailable,
|
|
12753
|
+
failed,
|
|
12754
|
+
hasAccount: Boolean(accountAddress)
|
|
12755
|
+
})
|
|
12756
|
+
}
|
|
12757
|
+
),
|
|
12758
|
+
/* @__PURE__ */ jsxs(TooltipContent, { className: "tabular-nums break-all", children: [
|
|
12759
|
+
exactBalance,
|
|
12760
|
+
" ",
|
|
12761
|
+
symbol
|
|
12762
|
+
] })
|
|
12763
|
+
] }) : renderBalanceLabel({
|
|
12764
|
+
formatted,
|
|
12765
|
+
unavailable,
|
|
12766
|
+
failed,
|
|
12767
|
+
hasAccount: Boolean(accountAddress)
|
|
12768
|
+
})
|
|
12508
12769
|
}
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
className: "flex flex-col items-end gap-0.5",
|
|
12540
|
-
role: "status",
|
|
12541
|
-
"aria-label": `Loading ${symbol} balance`,
|
|
12542
|
-
children: [
|
|
12543
|
-
/* @__PURE__ */ jsx("span", { className: "h-4 w-14 animate-pulse rounded-md bg-foreground/10" }),
|
|
12544
|
-
/* @__PURE__ */ jsx("span", { className: "h-4 w-10 animate-pulse rounded-md bg-foreground/[0.06]" })
|
|
12545
|
-
]
|
|
12546
|
-
}
|
|
12547
|
-
)
|
|
12548
|
-
) : /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-end gap-0.5 tabular-nums", children: [
|
|
12549
|
-
usdValueLabel ? /* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-4", children: usdValueLabel }) : null,
|
|
12550
|
-
/* @__PURE__ */ jsx(
|
|
12551
|
-
"span",
|
|
12552
|
-
{
|
|
12553
|
-
className: cn(
|
|
12554
|
-
"text-sm leading-4",
|
|
12555
|
-
usdValueLabel ? "text-muted-foreground" : "font-medium"
|
|
12556
|
-
),
|
|
12557
|
-
children: exactBalance ? /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
12558
|
-
/* @__PURE__ */ jsx(
|
|
12559
|
-
TooltipTrigger,
|
|
12560
|
-
{
|
|
12561
|
-
tabIndex: 0,
|
|
12562
|
-
"aria-label": `${symbol} balance: ${exactBalance}`,
|
|
12563
|
-
render: /* @__PURE__ */ jsx("span", { className: "cursor-default rounded-sm" }),
|
|
12564
|
-
children: renderBalanceLabel({
|
|
12565
|
-
formatted,
|
|
12566
|
-
unavailable,
|
|
12567
|
-
failed,
|
|
12568
|
-
hasAccount: Boolean(accountAddress)
|
|
12569
|
-
})
|
|
12570
|
-
}
|
|
12571
|
-
),
|
|
12572
|
-
/* @__PURE__ */ jsxs(TooltipContent, { className: "tabular-nums break-all", children: [
|
|
12573
|
-
exactBalance,
|
|
12574
|
-
" ",
|
|
12575
|
-
symbol
|
|
12576
|
-
] })
|
|
12577
|
-
] }) : renderBalanceLabel({
|
|
12578
|
-
formatted,
|
|
12579
|
-
unavailable,
|
|
12580
|
-
failed,
|
|
12581
|
-
hasAccount: Boolean(accountAddress)
|
|
12582
|
-
})
|
|
12583
|
-
}
|
|
12584
|
-
)
|
|
12585
|
-
] })
|
|
12586
|
-
] }, identity);
|
|
12587
|
-
}),
|
|
12588
|
-
onAddUserToken && !addOpen ? /* @__PURE__ */ jsxs(
|
|
12589
|
-
"button",
|
|
12590
|
-
{
|
|
12591
|
-
type: "button",
|
|
12592
|
-
disabled: actionsDisabled,
|
|
12593
|
-
onClick: () => setAddOpen(true),
|
|
12594
|
-
className: "flex w-full items-center gap-3 rounded-xl p-2.5 text-left hover:opacity-80 disabled:opacity-40",
|
|
12595
|
-
children: [
|
|
12596
|
-
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-foreground/10", children: /* @__PURE__ */ jsx(Plus, { className: "size-4" }) }),
|
|
12597
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-4", children: "Add token" })
|
|
12598
|
-
]
|
|
12599
|
-
}
|
|
12600
|
-
) : null,
|
|
12601
|
-
onAddUserToken && addOpen ? /* @__PURE__ */ jsx(
|
|
12602
|
-
AddTokenForm,
|
|
12603
|
-
{
|
|
12604
|
-
existingSymbols,
|
|
12605
|
-
listedIdentities,
|
|
12606
|
-
onAdd: onAddUserToken,
|
|
12607
|
-
onClose: () => setAddOpen(false)
|
|
12608
|
-
}
|
|
12609
|
-
) : null,
|
|
12610
|
-
error ? /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", role: "status", children: error }) : null
|
|
12611
|
-
] }) }) });
|
|
12770
|
+
)
|
|
12771
|
+
] })
|
|
12772
|
+
] }, identity);
|
|
12773
|
+
}),
|
|
12774
|
+
onAddUserToken && !addOpen ? /* @__PURE__ */ jsxs(
|
|
12775
|
+
"button",
|
|
12776
|
+
{
|
|
12777
|
+
type: "button",
|
|
12778
|
+
disabled: actionsDisabled,
|
|
12779
|
+
onClick: () => setAddOpen(true),
|
|
12780
|
+
className: "flex w-full items-center gap-3 rounded-xl p-2.5 text-left hover:opacity-80 disabled:opacity-40",
|
|
12781
|
+
children: [
|
|
12782
|
+
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-foreground/10", children: /* @__PURE__ */ jsx(Plus, { className: "size-4" }) }),
|
|
12783
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-4", children: "Add token" })
|
|
12784
|
+
]
|
|
12785
|
+
}
|
|
12786
|
+
) : null,
|
|
12787
|
+
onAddUserToken && addOpen ? /* @__PURE__ */ jsx(
|
|
12788
|
+
AddTokenForm,
|
|
12789
|
+
{
|
|
12790
|
+
existingSymbols,
|
|
12791
|
+
listedIdentities,
|
|
12792
|
+
onAdd: onAddUserToken,
|
|
12793
|
+
onClose: () => setAddOpen(false)
|
|
12794
|
+
}
|
|
12795
|
+
) : null,
|
|
12796
|
+
error ? /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", role: "status", children: error }) : null
|
|
12797
|
+
]
|
|
12798
|
+
}
|
|
12799
|
+
) }) });
|
|
12612
12800
|
}
|
|
12613
12801
|
function formatTokenUsdValue(balance, usdPrice) {
|
|
12614
|
-
if (
|
|
12802
|
+
if (balance?.status !== "ready" || balance.formatted === null) return null;
|
|
12615
12803
|
if (usdPrice === void 0) return null;
|
|
12616
12804
|
const amount = Number(balance.formatted);
|
|
12617
12805
|
if (!Number.isFinite(amount)) return null;
|
|
@@ -12630,7 +12818,7 @@ function renderBalanceLabel({
|
|
|
12630
12818
|
return null;
|
|
12631
12819
|
}
|
|
12632
12820
|
function getComparableBalance(balance) {
|
|
12633
|
-
if (
|
|
12821
|
+
if (balance?.status !== "ready" || balance.raw === null) return 0n;
|
|
12634
12822
|
const decimals = BigInt(balance.decimals);
|
|
12635
12823
|
if (decimals === 18n) return balance.raw;
|
|
12636
12824
|
if (decimals < 18n) return balance.raw * 10n ** (18n - decimals);
|
|
@@ -12739,7 +12927,6 @@ function WalletMenuActionCard({
|
|
|
12739
12927
|
onGasPaymentTokenChange,
|
|
12740
12928
|
silentSigningEnabled,
|
|
12741
12929
|
onSilentSigningChange,
|
|
12742
|
-
onDisconnect,
|
|
12743
12930
|
onConnectWithX,
|
|
12744
12931
|
tab,
|
|
12745
12932
|
onTabChange,
|
|
@@ -12859,9 +13046,11 @@ function WalletMenuActionCard({
|
|
|
12859
13046
|
}
|
|
12860
13047
|
});
|
|
12861
13048
|
};
|
|
12862
|
-
|
|
13049
|
+
const [swapperAccount, setSwapperAccount] = useState(actionAddress);
|
|
13050
|
+
if (swapperAccount !== actionAddress) {
|
|
13051
|
+
setSwapperAccount(actionAddress);
|
|
12863
13052
|
setSwapperConfig(null);
|
|
12864
|
-
}
|
|
13053
|
+
}
|
|
12865
13054
|
const explorerTarget = externalWalletAccount ? connectedAddress : actionAddress;
|
|
12866
13055
|
const handleExplorer = () => {
|
|
12867
13056
|
setActionStatus(null);
|
|
@@ -12924,6 +13113,7 @@ function WalletMenuActionCard({
|
|
|
12924
13113
|
busy: balancesBusy,
|
|
12925
13114
|
displayTokens,
|
|
12926
13115
|
gasTokens,
|
|
13116
|
+
addUserToken,
|
|
12927
13117
|
removeUserToken
|
|
12928
13118
|
} = useFluentTokenBalances({
|
|
12929
13119
|
accountAddress,
|
|
@@ -13192,6 +13382,7 @@ function WalletMenuActionCard({
|
|
|
13192
13382
|
"span",
|
|
13193
13383
|
{
|
|
13194
13384
|
className: "relative inline-flex items-baseline",
|
|
13385
|
+
role: "status",
|
|
13195
13386
|
"aria-busy": "true",
|
|
13196
13387
|
"aria-label": "Loading portfolio total",
|
|
13197
13388
|
children: [
|
|
@@ -13224,6 +13415,7 @@ function WalletMenuActionCard({
|
|
|
13224
13415
|
"span",
|
|
13225
13416
|
{
|
|
13226
13417
|
className: "relative inline-flex items-center gap-1.5",
|
|
13418
|
+
role: "status",
|
|
13227
13419
|
"aria-busy": "true",
|
|
13228
13420
|
"aria-label": "Loading portfolio pnl",
|
|
13229
13421
|
children: [
|
|
@@ -13325,6 +13517,7 @@ function WalletMenuActionCard({
|
|
|
13325
13517
|
usdPrices: prices,
|
|
13326
13518
|
tokens: displayTokens,
|
|
13327
13519
|
selectedSymbol: gasPaymentToken,
|
|
13520
|
+
onAddUserToken: addUserToken,
|
|
13328
13521
|
onRemoveUserToken: removeUserToken,
|
|
13329
13522
|
actionsDisabled: settingsPending,
|
|
13330
13523
|
error: tokenListError
|
|
@@ -13376,8 +13569,7 @@ function WalletMenuActionCard({
|
|
|
13376
13569
|
{
|
|
13377
13570
|
className: "flex items-center justify-center rounded-xl bg-foreground/5 px-4 py-8",
|
|
13378
13571
|
"aria-busy": "true",
|
|
13379
|
-
"aria-label": "Loading reputation"
|
|
13380
|
-
children: /* @__PURE__ */ jsx(Spinner, { className: "size-5 text-foreground/70" })
|
|
13572
|
+
children: /* @__PURE__ */ jsx(Spinner, { className: "size-5 text-foreground/70", "aria-label": "Loading reputation" })
|
|
13381
13573
|
}
|
|
13382
13574
|
) : null,
|
|
13383
13575
|
reputation.phase === "disconnected" ? /* @__PURE__ */ jsx(
|
|
@@ -13702,14 +13894,20 @@ function useFluentSwapQuote({
|
|
|
13702
13894
|
settledAmount?.toString()
|
|
13703
13895
|
],
|
|
13704
13896
|
enabled: ready,
|
|
13705
|
-
queryFn: () =>
|
|
13706
|
-
|
|
13707
|
-
|
|
13708
|
-
|
|
13709
|
-
|
|
13710
|
-
|
|
13711
|
-
|
|
13712
|
-
|
|
13897
|
+
queryFn: () => {
|
|
13898
|
+
if (!contracts || !tokenIn || !tokenOut || settledAmount === void 0) {
|
|
13899
|
+
const missing = !contracts ? "contracts" : !tokenIn ? "tokenIn" : !tokenOut ? "tokenOut" : "settledAmount";
|
|
13900
|
+
throw new Error(`useFluentSwapQuote: ${missing} is missing`);
|
|
13901
|
+
}
|
|
13902
|
+
return getFluentSwapQuote({
|
|
13903
|
+
client: client2,
|
|
13904
|
+
network,
|
|
13905
|
+
contracts,
|
|
13906
|
+
tokenIn,
|
|
13907
|
+
tokenOut,
|
|
13908
|
+
amountIn: settledAmount
|
|
13909
|
+
});
|
|
13910
|
+
},
|
|
13713
13911
|
refetchInterval: FLUENT_SWAP_QUOTE_REFRESH_MS,
|
|
13714
13912
|
// A pair with no pool answers the same way however often it is asked.
|
|
13715
13913
|
retry: (failureCount, error) => !(error instanceof FluentSwapError) && failureCount < 1,
|
|
@@ -14022,6 +14220,7 @@ function useOrderDepositRoute({
|
|
|
14022
14220
|
pair?.tokenOut
|
|
14023
14221
|
],
|
|
14024
14222
|
queryFn: async ({ signal }) => {
|
|
14223
|
+
if (!pair) throw new Error("useOrderDepositRoute: pair is missing");
|
|
14025
14224
|
const quote = await readSignableQuote(
|
|
14026
14225
|
pair,
|
|
14027
14226
|
{
|
|
@@ -14079,7 +14278,17 @@ function useOrderDepositQuote({
|
|
|
14079
14278
|
from,
|
|
14080
14279
|
to
|
|
14081
14280
|
],
|
|
14082
|
-
queryFn: ({ signal }) =>
|
|
14281
|
+
queryFn: ({ signal }) => {
|
|
14282
|
+
if (!pair || settledAmount === void 0) {
|
|
14283
|
+
const missing = !pair ? "pair" : "settledAmount";
|
|
14284
|
+
throw new Error(`useOrderDepositQuote: ${missing} is missing`);
|
|
14285
|
+
}
|
|
14286
|
+
return readSignableQuote(
|
|
14287
|
+
pair,
|
|
14288
|
+
{ amountIn: settledAmount, sender: from, recipient: to },
|
|
14289
|
+
signal
|
|
14290
|
+
);
|
|
14291
|
+
},
|
|
14083
14292
|
enabled: settled,
|
|
14084
14293
|
staleTime: ORDER_DEPOSIT_QUOTE_REFRESH_MS,
|
|
14085
14294
|
refetchInterval: paused ? false : ORDER_DEPOSIT_QUOTE_REFRESH_MS,
|
|
@@ -14178,9 +14387,11 @@ function useBridgeDeposit({
|
|
|
14178
14387
|
const isOrder = isSwap && orderRoute.available;
|
|
14179
14388
|
const routeChecking = isSwap && orderRoute.checking;
|
|
14180
14389
|
const viaFacility = isSwap && !isOrder && !routeChecking;
|
|
14181
|
-
|
|
14390
|
+
const [amountSymbol, setAmountSymbol] = useState(token.symbol);
|
|
14391
|
+
if (amountSymbol !== token.symbol) {
|
|
14392
|
+
setAmountSymbol(token.symbol);
|
|
14182
14393
|
setAmount("");
|
|
14183
|
-
}
|
|
14394
|
+
}
|
|
14184
14395
|
const [walletChainId, setWalletChainId] = useState(void 0);
|
|
14185
14396
|
useEffect(() => {
|
|
14186
14397
|
if (!connector) {
|
|
@@ -14253,7 +14464,14 @@ function useBridgeDeposit({
|
|
|
14253
14464
|
});
|
|
14254
14465
|
const fastPathFee = useQuery({
|
|
14255
14466
|
queryKey: ["fluent-bridge-fast-path-fee", route.fastPathPortal, route.destination.id],
|
|
14256
|
-
queryFn: () =>
|
|
14467
|
+
queryFn: () => {
|
|
14468
|
+
const portal = route.fastPathPortal;
|
|
14469
|
+
if (!publicClient || !portal) {
|
|
14470
|
+
const missing = !publicClient ? "publicClient" : "route.fastPathPortal";
|
|
14471
|
+
throw new Error(`useBridgeDeposit fast path fee: ${missing} is missing`);
|
|
14472
|
+
}
|
|
14473
|
+
return readFastPathFeeWei(publicClient, portal, route.destination.id);
|
|
14474
|
+
},
|
|
14257
14475
|
enabled: deliveredToken.route === "fast-path" && // Nothing is bridged on an Order deposit, so there is no bridge fee to read.
|
|
14258
14476
|
!isOrder && !routeChecking && Boolean(publicClient && route.fastPathPortal),
|
|
14259
14477
|
staleTime: 3e4
|
|
@@ -14332,37 +14550,43 @@ function useBridgeDeposit({
|
|
|
14332
14550
|
fee?.toString()
|
|
14333
14551
|
],
|
|
14334
14552
|
queryFn: async () => {
|
|
14335
|
-
const
|
|
14336
|
-
|
|
14553
|
+
const missing = (name) => {
|
|
14554
|
+
throw new Error(`useBridgeDeposit gas estimate: ${name} is missing`);
|
|
14555
|
+
};
|
|
14556
|
+
const client2 = publicClient ?? missing("publicClient");
|
|
14557
|
+
const account = address ?? missing("address");
|
|
14558
|
+
const to = recipient ?? missing("recipient");
|
|
14559
|
+
const amount2 = amountWei ?? missing("amountWei");
|
|
14560
|
+
const value = fee ?? missing("fee");
|
|
14337
14561
|
const gas = deliveredToken.route === "native" ? await client2.estimateContractGas({
|
|
14338
14562
|
account,
|
|
14339
14563
|
address: route.nativeGateway,
|
|
14340
14564
|
abi: nativeGatewayAbi,
|
|
14341
14565
|
functionName: "sendNativeTokens",
|
|
14342
|
-
args: [
|
|
14343
|
-
value:
|
|
14566
|
+
args: [to],
|
|
14567
|
+
value: amount2 + value
|
|
14344
14568
|
}) : deliveredToken.route === "canonical" ? await client2.estimateContractGas({
|
|
14345
14569
|
account,
|
|
14346
|
-
address: bridgeSpender,
|
|
14570
|
+
address: bridgeSpender ?? missing("bridgeSpender"),
|
|
14347
14571
|
abi: erc20GatewayAbi,
|
|
14348
14572
|
functionName: "sendTokens",
|
|
14349
|
-
args: [deliveredToken.l1Address,
|
|
14350
|
-
value
|
|
14573
|
+
args: [deliveredToken.l1Address ?? missing("l1Address"), to, amount2],
|
|
14574
|
+
value
|
|
14351
14575
|
}) : await client2.estimateContractGas({
|
|
14352
14576
|
account,
|
|
14353
|
-
address: bridgeSpender,
|
|
14577
|
+
address: bridgeSpender ?? missing("bridgeSpender"),
|
|
14354
14578
|
abi: fastPathPortalAbi,
|
|
14355
14579
|
functionName: "sendToken",
|
|
14356
14580
|
args: [
|
|
14357
|
-
|
|
14358
|
-
deliveredToken.l1Address,
|
|
14581
|
+
amount2,
|
|
14582
|
+
deliveredToken.l1Address ?? missing("l1Address"),
|
|
14359
14583
|
route.destination.id,
|
|
14360
|
-
padHex(deliveredToken.l2Address, { size: 32 }),
|
|
14361
|
-
padHex(
|
|
14584
|
+
padHex(deliveredToken.l2Address ?? missing("l2Address"), { size: 32 }),
|
|
14585
|
+
padHex(to, { size: 32 }),
|
|
14362
14586
|
padHex(account, { size: 32 }),
|
|
14363
14587
|
"0x"
|
|
14364
14588
|
],
|
|
14365
|
-
value
|
|
14589
|
+
value
|
|
14366
14590
|
});
|
|
14367
14591
|
return gas * await client2.getGasPrice();
|
|
14368
14592
|
},
|
|
@@ -14566,24 +14790,14 @@ function useBridgeDeposit({
|
|
|
14566
14790
|
setState((s) => ({ ...s, swappedAmount: bridgeAmount }));
|
|
14567
14791
|
debugLog("[FluentBridge] swapped", { in: amountWei, out: bridgeAmount, swapHash });
|
|
14568
14792
|
}
|
|
14569
|
-
|
|
14570
|
-
if (!bridgeToken.l1Address || !bridgeSpender) {
|
|
14571
|
-
throw new Error(`${bridgeToken.symbol} is not configured on this network`);
|
|
14572
|
-
}
|
|
14573
|
-
await ensureAllowance(
|
|
14574
|
-
bridgeToken.l1Address,
|
|
14575
|
-
bridgeSpender,
|
|
14576
|
-
bridgeAmount,
|
|
14577
|
-
bridgeToken.symbol
|
|
14578
|
-
);
|
|
14579
|
-
}
|
|
14580
|
-
setState((s) => ({
|
|
14793
|
+
const confirming = () => setState((s) => ({
|
|
14581
14794
|
...s,
|
|
14582
14795
|
phase: "confirming",
|
|
14583
14796
|
stepLabel: "Confirm the deposit in your wallet"
|
|
14584
14797
|
}));
|
|
14585
14798
|
let hash;
|
|
14586
14799
|
if (bridgeToken.route === "native") {
|
|
14800
|
+
confirming();
|
|
14587
14801
|
hash = await writeContractAsync({
|
|
14588
14802
|
address: route.nativeGateway,
|
|
14589
14803
|
abi: nativeGatewayAbi,
|
|
@@ -14592,32 +14806,44 @@ function useBridgeDeposit({
|
|
|
14592
14806
|
value: bridgeAmount + fee,
|
|
14593
14807
|
chainId: route.source.id
|
|
14594
14808
|
});
|
|
14595
|
-
} else
|
|
14596
|
-
|
|
14809
|
+
} else {
|
|
14810
|
+
const l1Address = bridgeToken.l1Address;
|
|
14811
|
+
if (!l1Address || !bridgeSpender) {
|
|
14812
|
+
throw new Error(`${bridgeToken.symbol} is not configured on this network`);
|
|
14813
|
+
}
|
|
14814
|
+
const l2Address = bridgeToken.route === "canonical" ? void 0 : bridgeToken.l2Address;
|
|
14815
|
+
if (bridgeToken.route !== "canonical" && !l2Address) {
|
|
14816
|
+
throw new Error(`${bridgeToken.symbol} has no Fluent token address on this network`);
|
|
14817
|
+
}
|
|
14818
|
+
await ensureAllowance(l1Address, bridgeSpender, bridgeAmount, bridgeToken.symbol);
|
|
14819
|
+
confirming();
|
|
14820
|
+
hash = !l2Address ? await writeContractAsync({
|
|
14597
14821
|
address: bridgeSpender,
|
|
14598
14822
|
abi: erc20GatewayAbi,
|
|
14599
14823
|
functionName: "sendTokens",
|
|
14600
|
-
args: [
|
|
14601
|
-
value: fee,
|
|
14602
|
-
chainId: route.source.id
|
|
14603
|
-
});
|
|
14604
|
-
} else {
|
|
14605
|
-
hash = await writeContractAsync({
|
|
14606
|
-
address: bridgeSpender,
|
|
14607
|
-
abi: fastPathPortalAbi,
|
|
14608
|
-
functionName: "sendToken",
|
|
14609
|
-
args: [
|
|
14610
|
-
bridgeAmount,
|
|
14611
|
-
bridgeToken.l1Address,
|
|
14612
|
-
route.destination.id,
|
|
14613
|
-
padHex(bridgeToken.l2Address, { size: 32 }),
|
|
14614
|
-
padHex(recipient, { size: 32 }),
|
|
14615
|
-
padHex(address, { size: 32 }),
|
|
14616
|
-
"0x"
|
|
14617
|
-
],
|
|
14824
|
+
args: [l1Address, recipient, bridgeAmount],
|
|
14618
14825
|
value: fee,
|
|
14619
14826
|
chainId: route.source.id
|
|
14620
|
-
})
|
|
14827
|
+
}) : (
|
|
14828
|
+
// Fast path addresses everything as bytes32 so one portal can serve
|
|
14829
|
+
// non-EVM destinations too; the refund address is the sender.
|
|
14830
|
+
await writeContractAsync({
|
|
14831
|
+
address: bridgeSpender,
|
|
14832
|
+
abi: fastPathPortalAbi,
|
|
14833
|
+
functionName: "sendToken",
|
|
14834
|
+
args: [
|
|
14835
|
+
bridgeAmount,
|
|
14836
|
+
l1Address,
|
|
14837
|
+
route.destination.id,
|
|
14838
|
+
padHex(l2Address, { size: 32 }),
|
|
14839
|
+
padHex(recipient, { size: 32 }),
|
|
14840
|
+
padHex(address, { size: 32 }),
|
|
14841
|
+
"0x"
|
|
14842
|
+
],
|
|
14843
|
+
value: fee,
|
|
14844
|
+
chainId: route.source.id
|
|
14845
|
+
})
|
|
14846
|
+
);
|
|
14621
14847
|
}
|
|
14622
14848
|
if (onSubmittedRef.current?.({ hash, sender: address, delivered: bridgeAmount })) {
|
|
14623
14849
|
relayBaseline.current = void 0;
|
|
@@ -14904,11 +15130,10 @@ function ApprovalSteps({
|
|
|
14904
15130
|
{ step: 2, label: actionLabel }
|
|
14905
15131
|
];
|
|
14906
15132
|
return /* @__PURE__ */ jsx(
|
|
14907
|
-
"
|
|
15133
|
+
"fieldset",
|
|
14908
15134
|
{
|
|
14909
|
-
role: "group",
|
|
14910
15135
|
"aria-label": `Step ${currentStep} of 2`,
|
|
14911
|
-
className: "grid grid-cols-2 gap-1.5 border-t border-foreground/10 py-4",
|
|
15136
|
+
className: "m-0 grid min-w-auto grid-cols-2 gap-1.5 border-x-0 border-t border-b-0 border-foreground/10 px-0 py-4",
|
|
14912
15137
|
children: steps.map(({ step, label }) => {
|
|
14913
15138
|
const done = step < currentStep;
|
|
14914
15139
|
const active = step === currentStep;
|
|
@@ -14947,7 +15172,7 @@ function StatusView({
|
|
|
14947
15172
|
const { state, token, deliveredToken } = bridge;
|
|
14948
15173
|
const step = state.phase === "settled" ? 3 : state.phase === "relaying" ? 2 : 1;
|
|
14949
15174
|
const settled = state.phase === "settled";
|
|
14950
|
-
const heading = settled ? "Success" : state.phase === "relaying" ? "Funds on the way" : state.phase === "submitted" ?
|
|
15175
|
+
const heading = settled ? "Success" : state.phase === "relaying" ? "Funds on the way" : state.phase === "submitted" ? `Confirming on ${route.source.name}` : state.stepLabel ?? (state.phase === "approving" ? `Approve ${token.symbol} in your wallet` : "Confirm in your wallet");
|
|
14951
15176
|
const onTheWay = state.viaOrder ? state.slow ? "Your order is open, but the funds are taking longer than usual to arrive. They will land as soon as a solver fills the order." : `Your funds are on their way to ${route.destination.name} \u2014 this usually takes about a minute.` : state.slow ? "Your deposit went through, but the funds are taking longer than usual to arrive. They will land as soon as the bridge relays them." : `Your funds are on their way to ${route.destination.name} \u2014 this usually takes a few minutes.`;
|
|
14952
15177
|
const detail = settled ? `Your ${deliveredToken.symbol} has landed on ${route.destination.name}.` : state.phase === "relaying" ? onTheWay : state.phase === "submitted" ? "Waiting for the transaction to be included in a block." : state.phase === "swapping" ? `Converting on ${route.source.name} at 1:1 through the M^0 swap facility. The bridge deposit follows once it is mined.` : state.phase === "approving" ? "Allow the contract to move your tokens. The next signature does the actual transfer." : `Approve the deposit in your wallet to send it from ${route.source.name}.`;
|
|
14953
15178
|
const explorerLink = state.phase === "settled" && state.receivedHash ? {
|
|
@@ -14959,7 +15184,7 @@ function StatusView({
|
|
|
14959
15184
|
} : void 0;
|
|
14960
15185
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-4 flex-1 items-center justify-center", children: [
|
|
14961
15186
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 px-4 pt-8 text-center", children: [
|
|
14962
|
-
swap ? /* @__PURE__ */ jsx(StatusGlyph, { status: "loading" }) : /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5", "aria-label": `Step ${step} of 3`, children: [1, 2, 3].map((index) => /* @__PURE__ */ jsx(
|
|
15187
|
+
swap ? /* @__PURE__ */ jsx(StatusGlyph, { status: "loading" }) : /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5", role: "img", "aria-label": `Step ${step} of 3`, children: [1, 2, 3].map((index) => /* @__PURE__ */ jsx(
|
|
14963
15188
|
"span",
|
|
14964
15189
|
{
|
|
14965
15190
|
className: `h-1 w-8 rounded-full ${index <= step ? "bg-foreground/70" : "bg-foreground/15"}`
|
|
@@ -16198,21 +16423,22 @@ function withUserOperationGas(client2, args, gas) {
|
|
|
16198
16423
|
return args;
|
|
16199
16424
|
}
|
|
16200
16425
|
const paymaster = args.paymaster ?? client2.paymaster;
|
|
16426
|
+
const getPaymasterData2 = typeof paymaster === "object" ? paymaster.getPaymasterData : void 0;
|
|
16201
16427
|
const policyArgs = {
|
|
16202
16428
|
...args,
|
|
16203
16429
|
// viem treats a getPaymasterData-only adapter as a single authorization
|
|
16204
16430
|
// before gas estimation. Expose both phases so changed limits are authorized
|
|
16205
16431
|
// again before signing, including a stub marked final by the provider.
|
|
16206
|
-
...typeof paymaster === "object" &&
|
|
16432
|
+
...typeof paymaster === "object" && getPaymasterData2 ? {
|
|
16207
16433
|
paymaster: {
|
|
16208
16434
|
async getPaymasterStubData(operation) {
|
|
16209
|
-
const getStub = paymaster.getPaymasterStubData ??
|
|
16435
|
+
const getStub = paymaster.getPaymasterStubData ?? getPaymasterData2;
|
|
16210
16436
|
return {
|
|
16211
16437
|
...await getStub.call(paymaster, operation),
|
|
16212
16438
|
isFinal: false
|
|
16213
16439
|
};
|
|
16214
16440
|
},
|
|
16215
|
-
getPaymasterData:
|
|
16441
|
+
getPaymasterData: getPaymasterData2.bind(paymaster)
|
|
16216
16442
|
}
|
|
16217
16443
|
} : {}
|
|
16218
16444
|
};
|
|
@@ -16322,6 +16548,12 @@ function withoutGasEstimation(client2, args, gas) {
|
|
|
16322
16548
|
paymaster: {
|
|
16323
16549
|
async getPaymasterStubData(operation) {
|
|
16324
16550
|
const getStub = adapter.getPaymasterStubData ?? adapter.getPaymasterData;
|
|
16551
|
+
if (!getStub) {
|
|
16552
|
+
throw new FluentUserOperationGasError(
|
|
16553
|
+
"invalid_policy",
|
|
16554
|
+
"skipEstimation needs a paymaster adapter with getPaymasterStubData or getPaymasterData"
|
|
16555
|
+
);
|
|
16556
|
+
}
|
|
16325
16557
|
const fixedOperation = { ...operation, ...limits };
|
|
16326
16558
|
const data = await getStub.call(adapter, fixedOperation);
|
|
16327
16559
|
const isFinal = !adapter.getPaymasterStubData || "isFinal" in data && data.isFinal === true;
|
|
@@ -16330,6 +16562,12 @@ function withoutGasEstimation(client2, args, gas) {
|
|
|
16330
16562
|
},
|
|
16331
16563
|
async getPaymasterData(operation) {
|
|
16332
16564
|
const fixedOperation = { ...operation, ...limits };
|
|
16565
|
+
if (!adapter.getPaymasterData) {
|
|
16566
|
+
throw new FluentUserOperationGasError(
|
|
16567
|
+
"invalid_policy",
|
|
16568
|
+
"skipEstimation needs a paymaster adapter with getPaymasterData"
|
|
16569
|
+
);
|
|
16570
|
+
}
|
|
16333
16571
|
const data = await adapter.getPaymasterData(fixedOperation);
|
|
16334
16572
|
acceptGas(data, true);
|
|
16335
16573
|
return { ...data, ...limits };
|
|
@@ -17213,16 +17451,22 @@ function useFluentZeroDevAccount(hookOptions = {}) {
|
|
|
17213
17451
|
const initPromise = useRef({});
|
|
17214
17452
|
const sponsorshipUnavailable = useRef(false);
|
|
17215
17453
|
const embeddedWallet = wallets.find((wallet) => wallet.walletClientType === "privy");
|
|
17454
|
+
const embeddedWalletCount = wallets.filter(
|
|
17455
|
+
(wallet) => wallet.walletClientType === "privy"
|
|
17456
|
+
).length;
|
|
17457
|
+
const walletCount = wallets.length;
|
|
17216
17458
|
const activeKernel = kernels.prompt ?? kernels.silent ?? null;
|
|
17217
17459
|
const executionRef = useRef(FLUENT_CONNECT_DEFAULT_EXECUTION);
|
|
17218
17460
|
executionRef.current = hookOptions.execution ?? FLUENT_CONNECT_DEFAULT_EXECUTION;
|
|
17219
17461
|
const readExecution = useCallback(() => executionRef.current, []);
|
|
17220
|
-
|
|
17462
|
+
const [kernelChainId, setKernelChainId] = useState(chain.id);
|
|
17463
|
+
if (kernelChainId !== chain.id) {
|
|
17464
|
+
setKernelChainId(chain.id);
|
|
17221
17465
|
setKernels({});
|
|
17222
17466
|
setSmartAccountReady(false);
|
|
17223
17467
|
setError(null);
|
|
17224
17468
|
initPromise.current = {};
|
|
17225
|
-
}
|
|
17469
|
+
}
|
|
17226
17470
|
const initialize2 = useCallback(
|
|
17227
17471
|
async (options = {}) => {
|
|
17228
17472
|
const signerMode = options.signerMode ?? "prompt";
|
|
@@ -17231,8 +17475,8 @@ function useFluentZeroDevAccount(hookOptions = {}) {
|
|
|
17231
17475
|
signerMode,
|
|
17232
17476
|
ready,
|
|
17233
17477
|
authenticated,
|
|
17234
|
-
walletCount
|
|
17235
|
-
embeddedWalletCount
|
|
17478
|
+
walletCount,
|
|
17479
|
+
embeddedWalletCount,
|
|
17236
17480
|
hasEmbeddedWallet: Boolean(embeddedWallet),
|
|
17237
17481
|
hasKernel: Boolean(cachedKernel),
|
|
17238
17482
|
cachedSignerModes: Object.keys(kernels),
|
|
@@ -17248,22 +17492,23 @@ function useFluentZeroDevAccount(hookOptions = {}) {
|
|
|
17248
17492
|
return cachedKernel;
|
|
17249
17493
|
}
|
|
17250
17494
|
const canUseLocalSigner = ready && authenticated && Boolean(embeddedWallet);
|
|
17251
|
-
const
|
|
17495
|
+
const authorizationSession = signerMode === "silent" && hookOptions.authorizationSession?.serializedPermissionAccount && (hookOptions.authorizationSession.expiresAt ?? 0) > Math.floor(Date.now() / 1e3) ? hookOptions.authorizationSession : void 0;
|
|
17496
|
+
const canUseAuthorizationSession = authorizationSession !== void 0;
|
|
17252
17497
|
if (!canUseLocalSigner && !canUseAuthorizationSession) {
|
|
17253
17498
|
const nextError = new Error(
|
|
17254
17499
|
getZeroDevReadinessMessage({
|
|
17255
17500
|
ready,
|
|
17256
17501
|
authenticated,
|
|
17257
|
-
embeddedWalletCount
|
|
17258
|
-
walletCount
|
|
17502
|
+
embeddedWalletCount,
|
|
17503
|
+
walletCount
|
|
17259
17504
|
})
|
|
17260
17505
|
);
|
|
17261
17506
|
debugWarn("[fluent zerodev] initialize blocked", {
|
|
17262
17507
|
message: nextError.message,
|
|
17263
17508
|
ready,
|
|
17264
17509
|
authenticated,
|
|
17265
|
-
embeddedWalletCount
|
|
17266
|
-
walletCount
|
|
17510
|
+
embeddedWalletCount,
|
|
17511
|
+
walletCount
|
|
17267
17512
|
});
|
|
17268
17513
|
setError(nextError);
|
|
17269
17514
|
if (options.throwOnError) throw nextError;
|
|
@@ -17288,8 +17533,8 @@ function useFluentZeroDevAccount(hookOptions = {}) {
|
|
|
17288
17533
|
hasEmbeddedWallet: Boolean(embeddedWallet),
|
|
17289
17534
|
walletClientType: embeddedWallet?.walletClientType
|
|
17290
17535
|
});
|
|
17291
|
-
const nextKernel =
|
|
17292
|
-
|
|
17536
|
+
const nextKernel = authorizationSession ? await createFluentZeroDevAuthorizedSessionKernel(
|
|
17537
|
+
authorizationSession,
|
|
17293
17538
|
chain,
|
|
17294
17539
|
readExecution
|
|
17295
17540
|
) : await createFluentZeroDevKernel({
|
|
@@ -17333,7 +17578,9 @@ function useFluentZeroDevAccount(hookOptions = {}) {
|
|
|
17333
17578
|
[
|
|
17334
17579
|
activeKernel,
|
|
17335
17580
|
authenticated,
|
|
17581
|
+
chain,
|
|
17336
17582
|
embeddedWallet,
|
|
17583
|
+
embeddedWalletCount,
|
|
17337
17584
|
kernels,
|
|
17338
17585
|
hookOptions.sessionSmartAccountAddress,
|
|
17339
17586
|
hookOptions.authorizationSession,
|
|
@@ -17341,6 +17588,7 @@ function useFluentZeroDevAccount(hookOptions = {}) {
|
|
|
17341
17588
|
promptSignTypedData,
|
|
17342
17589
|
readExecution,
|
|
17343
17590
|
ready,
|
|
17591
|
+
walletCount,
|
|
17344
17592
|
zeroDevProjectId
|
|
17345
17593
|
]
|
|
17346
17594
|
);
|
|
@@ -17427,7 +17675,7 @@ function useFluentZeroDevAccount(hookOptions = {}) {
|
|
|
17427
17675
|
signerAddress: embeddedWallet?.address ?? hookOptions.sessionSignerAddress,
|
|
17428
17676
|
privyReady: ready,
|
|
17429
17677
|
privyAuthenticated: authenticated,
|
|
17430
|
-
embeddedWalletCount
|
|
17678
|
+
embeddedWalletCount,
|
|
17431
17679
|
authenticate: login,
|
|
17432
17680
|
kernel: activeKernel,
|
|
17433
17681
|
signerModesReady: Object.keys(kernels),
|
|
@@ -17717,7 +17965,7 @@ function readUserOperationPaymaster(receipt) {
|
|
|
17717
17965
|
(log) => log.topics[0]?.toLowerCase() === USER_OPERATION_EVENT_TOPIC2 && log.topics[1]?.toLowerCase() === receipt.userOpHash.toLowerCase()
|
|
17718
17966
|
);
|
|
17719
17967
|
const topic = event?.topics[3];
|
|
17720
|
-
if (
|
|
17968
|
+
if (topic?.length !== 66) return void 0;
|
|
17721
17969
|
return getAddress(`0x${topic.slice(26)}`);
|
|
17722
17970
|
}
|
|
17723
17971
|
function getZeroDevReadinessMessage(params) {
|
|
@@ -18039,79 +18287,86 @@ function TransactionReviewScreen({
|
|
|
18039
18287
|
return (
|
|
18040
18288
|
// `flex-1`: the drawer lays its page out as a flex column, so the page fills
|
|
18041
18289
|
// it and the buttons can sit at the bottom whatever the call count.
|
|
18042
|
-
/* @__PURE__ */ jsxs(
|
|
18043
|
-
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
|
|
18047
|
-
|
|
18048
|
-
|
|
18049
|
-
"
|
|
18050
|
-
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18056
|
-
|
|
18057
|
-
|
|
18058
|
-
|
|
18059
|
-
|
|
18060
|
-
|
|
18061
|
-
|
|
18062
|
-
|
|
18063
|
-
|
|
18064
|
-
|
|
18290
|
+
/* @__PURE__ */ jsxs(
|
|
18291
|
+
"section",
|
|
18292
|
+
{
|
|
18293
|
+
className: "flex w-full flex-1 flex-col gap-2.5",
|
|
18294
|
+
"aria-label": "Confirm Fluent transaction",
|
|
18295
|
+
children: [
|
|
18296
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 py-3", children: [
|
|
18297
|
+
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-foreground/10", children: /* @__PURE__ */ jsx(Layers, { className: "size-4" }) }),
|
|
18298
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0 text-center", children: [
|
|
18299
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 max-w-full truncate text-2xl font-medium", children: operation.reviewTitle ?? "Confirm transaction" }),
|
|
18300
|
+
/* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
18301
|
+
appName,
|
|
18302
|
+
" \xB7 ",
|
|
18303
|
+
calls.length === 1 ? "1 call" : `${calls.length} calls`
|
|
18304
|
+
] })
|
|
18305
|
+
] })
|
|
18306
|
+
] }),
|
|
18307
|
+
/* @__PURE__ */ jsxs("dl", { className: "flex flex-col gap-5 rounded-2xl bg-neutral-900 p-4 text-sm", children: [
|
|
18308
|
+
/* @__PURE__ */ jsx(DetailRow, { label: "Signing account", children: address ? /* @__PURE__ */ jsx(
|
|
18309
|
+
HashMenu,
|
|
18310
|
+
{
|
|
18311
|
+
hash: address,
|
|
18312
|
+
url: explorerAddress(address, network),
|
|
18313
|
+
onOpen: openExplorer,
|
|
18314
|
+
label: "Address"
|
|
18315
|
+
}
|
|
18316
|
+
) : "Fluent account" }),
|
|
18317
|
+
/* @__PURE__ */ jsxs(DetailRow, { label: "Network", children: [
|
|
18318
|
+
/* @__PURE__ */ jsx(
|
|
18319
|
+
"span",
|
|
18320
|
+
{
|
|
18321
|
+
className: `flex size-5 items-center justify-center rounded-full ${badge.bgClassName}`,
|
|
18322
|
+
children: /* @__PURE__ */ jsx(Icon, { name: badge.icon, className: `size-3 ${badge.iconClassName}` })
|
|
18323
|
+
}
|
|
18324
|
+
),
|
|
18325
|
+
chainName
|
|
18326
|
+
] })
|
|
18327
|
+
] }),
|
|
18065
18328
|
/* @__PURE__ */ jsx(
|
|
18066
|
-
"
|
|
18329
|
+
"dl",
|
|
18067
18330
|
{
|
|
18068
|
-
className:
|
|
18069
|
-
|
|
18331
|
+
className: "flex flex-col gap-5 rounded-2xl bg-neutral-900 p-4 text-sm",
|
|
18332
|
+
"aria-label": "Transaction calls",
|
|
18333
|
+
children: calls.map((call, index) => {
|
|
18334
|
+
const label = call.label ?? operation.calls[index]?.method ?? "Contract call";
|
|
18335
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
18336
|
+
/* @__PURE__ */ jsx(DetailRow, { label, children: /* @__PURE__ */ jsx(
|
|
18337
|
+
HashMenu,
|
|
18338
|
+
{
|
|
18339
|
+
hash: call.to,
|
|
18340
|
+
url: explorerAddress(call.to, network),
|
|
18341
|
+
onOpen: openExplorer,
|
|
18342
|
+
label: "Contract address"
|
|
18343
|
+
}
|
|
18344
|
+
) }),
|
|
18345
|
+
call.value > 0n ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 text-xs text-muted-foreground", children: [
|
|
18346
|
+
/* @__PURE__ */ jsx("span", { children: "Value" }),
|
|
18347
|
+
/* @__PURE__ */ jsxs(
|
|
18348
|
+
"span",
|
|
18349
|
+
{
|
|
18350
|
+
className: "font-medium text-foreground/80",
|
|
18351
|
+
title: `${call.value.toString()} wei`,
|
|
18352
|
+
children: [
|
|
18353
|
+
formatAmount(call.value, 18),
|
|
18354
|
+
" ETH"
|
|
18355
|
+
]
|
|
18356
|
+
}
|
|
18357
|
+
)
|
|
18358
|
+
] }) : null
|
|
18359
|
+
] }, call.id ?? `${call.to}-${index}`);
|
|
18360
|
+
})
|
|
18070
18361
|
}
|
|
18071
18362
|
),
|
|
18072
|
-
|
|
18073
|
-
|
|
18074
|
-
|
|
18075
|
-
|
|
18076
|
-
|
|
18077
|
-
|
|
18078
|
-
|
|
18079
|
-
"aria-label": "Transaction calls",
|
|
18080
|
-
children: calls.map((call, index) => {
|
|
18081
|
-
const label = call.label ?? operation.calls[index]?.method ?? "Contract call";
|
|
18082
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
18083
|
-
/* @__PURE__ */ jsx(DetailRow, { label, children: /* @__PURE__ */ jsx(
|
|
18084
|
-
HashMenu,
|
|
18085
|
-
{
|
|
18086
|
-
hash: call.to,
|
|
18087
|
-
url: explorerAddress(call.to, network),
|
|
18088
|
-
onOpen: openExplorer,
|
|
18089
|
-
label: "Contract address"
|
|
18090
|
-
}
|
|
18091
|
-
) }),
|
|
18092
|
-
call.value > 0n ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 text-xs text-muted-foreground", children: [
|
|
18093
|
-
/* @__PURE__ */ jsx("span", { children: "Value" }),
|
|
18094
|
-
/* @__PURE__ */ jsxs(
|
|
18095
|
-
"span",
|
|
18096
|
-
{
|
|
18097
|
-
className: "font-medium text-foreground/80",
|
|
18098
|
-
title: `${call.value.toString()} wei`,
|
|
18099
|
-
children: [
|
|
18100
|
-
formatAmount(call.value, 18),
|
|
18101
|
-
" ETH"
|
|
18102
|
-
]
|
|
18103
|
-
}
|
|
18104
|
-
)
|
|
18105
|
-
] }) : null
|
|
18106
|
-
] }, call.id ?? `${call.to}-${index}`);
|
|
18107
|
-
})
|
|
18108
|
-
}
|
|
18109
|
-
),
|
|
18110
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-auto flex flex-col gap-2 pt-2", children: [
|
|
18111
|
-
/* @__PURE__ */ jsx(Button, { type: "button", onClick: onConfirm, children: "Confirm and sign" }),
|
|
18112
|
-
/* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", onClick: onCancel, children: "Cancel" })
|
|
18113
|
-
] })
|
|
18114
|
-
] })
|
|
18363
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-auto flex flex-col gap-2 pt-2", children: [
|
|
18364
|
+
/* @__PURE__ */ jsx(Button, { type: "button", onClick: onConfirm, children: "Confirm and sign" }),
|
|
18365
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", onClick: onCancel, children: "Cancel" })
|
|
18366
|
+
] })
|
|
18367
|
+
]
|
|
18368
|
+
}
|
|
18369
|
+
)
|
|
18115
18370
|
);
|
|
18116
18371
|
}
|
|
18117
18372
|
function ReviewDialog({
|
|
@@ -18125,59 +18380,62 @@ function ReviewDialog({
|
|
|
18125
18380
|
children
|
|
18126
18381
|
}) {
|
|
18127
18382
|
const topLayer = useFluentTopLayer();
|
|
18128
|
-
const overlay =
|
|
18129
|
-
|
|
18130
|
-
|
|
18131
|
-
|
|
18132
|
-
|
|
18133
|
-
|
|
18134
|
-
|
|
18135
|
-
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
|
|
18139
|
-
|
|
18140
|
-
|
|
18141
|
-
|
|
18142
|
-
|
|
18143
|
-
|
|
18144
|
-
|
|
18145
|
-
|
|
18146
|
-
|
|
18147
|
-
/* @__PURE__ */
|
|
18383
|
+
const overlay = (
|
|
18384
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: a backdrop click is a pointer shortcut for Cancel; the Close and Cancel buttons are the keyboard path
|
|
18385
|
+
/* @__PURE__ */ jsx(
|
|
18386
|
+
"div",
|
|
18387
|
+
{
|
|
18388
|
+
className: "fixed inset-0 z-[80] grid place-items-center bg-[#030213]/70 p-6 backdrop-blur-md",
|
|
18389
|
+
role: "presentation",
|
|
18390
|
+
onClick: (event) => {
|
|
18391
|
+
if (event.target === event.currentTarget) onCancel();
|
|
18392
|
+
},
|
|
18393
|
+
children: /* @__PURE__ */ jsxs(
|
|
18394
|
+
"section",
|
|
18395
|
+
{
|
|
18396
|
+
className: "w-full max-w-[520px] rounded-[18px] border border-[#49eded]/30 bg-[#030213] p-[18px] text-white shadow-2xl",
|
|
18397
|
+
role: "dialog",
|
|
18398
|
+
"aria-modal": "true",
|
|
18399
|
+
"aria-label": ariaLabel,
|
|
18400
|
+
children: [
|
|
18401
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-3.5 flex items-start justify-between gap-3", children: [
|
|
18402
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
18403
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-black uppercase text-[#49eded]", children: eyebrow }),
|
|
18404
|
+
/* @__PURE__ */ jsx("h2", { className: "mt-1 text-2xl leading-[30px] font-medium", children: title })
|
|
18405
|
+
] }),
|
|
18406
|
+
/* @__PURE__ */ jsx(
|
|
18407
|
+
Button,
|
|
18408
|
+
{
|
|
18409
|
+
type: "button",
|
|
18410
|
+
variant: "secondary",
|
|
18411
|
+
size: "icon",
|
|
18412
|
+
"aria-label": "Close",
|
|
18413
|
+
onClick: onCancel,
|
|
18414
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": true })
|
|
18415
|
+
}
|
|
18416
|
+
)
|
|
18148
18417
|
] }),
|
|
18149
|
-
/* @__PURE__ */
|
|
18150
|
-
|
|
18151
|
-
{
|
|
18152
|
-
type: "button",
|
|
18153
|
-
variant: "secondary",
|
|
18154
|
-
size: "icon",
|
|
18155
|
-
"aria-label": "Close",
|
|
18156
|
-
onClick: onCancel,
|
|
18157
|
-
children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": true })
|
|
18158
|
-
}
|
|
18159
|
-
)
|
|
18160
|
-
] }),
|
|
18161
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 rounded-xl border border-[#49eded]/20 bg-[#49eded]/10 p-3", children: [
|
|
18162
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-white/65", children: "Signing account" }),
|
|
18163
|
-
/* @__PURE__ */ jsx("strong", { className: "text-sm", children: address ? formatAddress(address) : "Fluent account" })
|
|
18164
|
-
] }),
|
|
18165
|
-
children,
|
|
18166
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs leading-[18px] text-white/65", children: footnote }),
|
|
18167
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-3 grid grid-cols-[minmax(0,0.8fr)_minmax(0,1.2fr)] gap-2.5", children: [
|
|
18168
|
-
/* @__PURE__ */ jsxs(Button, { type: "button", variant: "secondary", onClick: onCancel, children: [
|
|
18169
|
-
/* @__PURE__ */ jsx(X, { className: "size-4 shrink-0", "aria-hidden": true }),
|
|
18170
|
-
"Cancel"
|
|
18418
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 rounded-xl border border-[#49eded]/20 bg-[#49eded]/10 p-3", children: [
|
|
18419
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-white/65", children: "Signing account" }),
|
|
18420
|
+
/* @__PURE__ */ jsx("strong", { className: "text-sm", children: address ? formatAddress(address) : "Fluent account" })
|
|
18171
18421
|
] }),
|
|
18172
|
-
|
|
18173
|
-
|
|
18174
|
-
|
|
18422
|
+
children,
|
|
18423
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs leading-[18px] text-white/65", children: footnote }),
|
|
18424
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-3 grid grid-cols-[minmax(0,0.8fr)_minmax(0,1.2fr)] gap-2.5", children: [
|
|
18425
|
+
/* @__PURE__ */ jsxs(Button, { type: "button", variant: "secondary", onClick: onCancel, children: [
|
|
18426
|
+
/* @__PURE__ */ jsx(X, { className: "size-4 shrink-0", "aria-hidden": true }),
|
|
18427
|
+
"Cancel"
|
|
18428
|
+
] }),
|
|
18429
|
+
/* @__PURE__ */ jsxs(Button, { type: "button", onClick: onConfirm, children: [
|
|
18430
|
+
/* @__PURE__ */ jsx(Check, { className: "size-4 shrink-0", "aria-hidden": true }),
|
|
18431
|
+
"Confirm and sign"
|
|
18432
|
+
] })
|
|
18175
18433
|
] })
|
|
18176
|
-
]
|
|
18177
|
-
|
|
18178
|
-
|
|
18179
|
-
|
|
18180
|
-
|
|
18434
|
+
]
|
|
18435
|
+
}
|
|
18436
|
+
)
|
|
18437
|
+
}
|
|
18438
|
+
)
|
|
18181
18439
|
);
|
|
18182
18440
|
if (!topLayer) return overlay;
|
|
18183
18441
|
return createPortal(/* @__PURE__ */ jsx(FluentTopLayerSlot, { children: overlay }), topLayer.element);
|
|
@@ -18209,7 +18467,7 @@ function SignatureReviewModal({
|
|
|
18209
18467
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-white/65", children: "Requested by" }),
|
|
18210
18468
|
/* @__PURE__ */ jsx("strong", { className: "break-all text-sm", children: review.origin })
|
|
18211
18469
|
] }),
|
|
18212
|
-
review.kind === "message" ? /* @__PURE__ */ jsx("pre", { className: `${ROW} ${CODE}`, "aria-label": "Message", children: formatMessage(review.message) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18470
|
+
review.kind === "message" ? /* @__PURE__ */ jsx("pre", { className: `${ROW} ${CODE}`, role: "document", "aria-label": "Message", children: formatMessage(review.message) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18213
18471
|
/* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-1 ${ROW}`, children: [
|
|
18214
18472
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-white/65", children: "Domain" }),
|
|
18215
18473
|
/* @__PURE__ */ jsx("pre", { className: CODE, children: stringifyWithBigInt(review.typedData.domain ?? {}, 2) })
|
|
@@ -18218,7 +18476,7 @@ function SignatureReviewModal({
|
|
|
18218
18476
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-white/65", children: "Primary type" }),
|
|
18219
18477
|
/* @__PURE__ */ jsx("strong", { className: "text-sm", children: review.typedData.primaryType })
|
|
18220
18478
|
] }),
|
|
18221
|
-
/* @__PURE__ */ jsx("pre", { className: `${ROW} ${CODE}`, "aria-label": "Message", children: stringifyWithBigInt(review.typedData.message, 2) })
|
|
18479
|
+
/* @__PURE__ */ jsx("pre", { className: `${ROW} ${CODE}`, role: "document", "aria-label": "Message", children: stringifyWithBigInt(review.typedData.message, 2) })
|
|
18222
18480
|
] })
|
|
18223
18481
|
] })
|
|
18224
18482
|
}
|
|
@@ -18397,7 +18655,7 @@ function createTopLayerElevator({
|
|
|
18397
18655
|
}
|
|
18398
18656
|
for (const target of TARGETS) {
|
|
18399
18657
|
const node = target.find();
|
|
18400
|
-
if (!node
|
|
18658
|
+
if (!node?.isConnected) continue;
|
|
18401
18659
|
ensureWatched(node, target);
|
|
18402
18660
|
if (!needsElevation || elevated.has(node) || topLayerHost.contains(node)) continue;
|
|
18403
18661
|
if (!target.isOpen(node)) continue;
|
|
@@ -18526,30 +18784,43 @@ function presentWidgetAccount(params) {
|
|
|
18526
18784
|
};
|
|
18527
18785
|
}
|
|
18528
18786
|
function useWidgetAccount(input) {
|
|
18787
|
+
const { sessionSmartAccountAddress, walletUserPrivySession = false } = input;
|
|
18529
18788
|
const {
|
|
18530
|
-
|
|
18531
|
-
|
|
18532
|
-
|
|
18533
|
-
|
|
18534
|
-
|
|
18789
|
+
smartAccountReady,
|
|
18790
|
+
smartAccountAddress,
|
|
18791
|
+
error,
|
|
18792
|
+
privyReady,
|
|
18793
|
+
privyAuthenticated,
|
|
18794
|
+
embeddedWalletCount
|
|
18795
|
+
} = input.smartAccount;
|
|
18796
|
+
const hasWallet = input.wallet !== null;
|
|
18797
|
+
const { connected = false, address, hasWalletClient = false, reconnecting } = input.wallet ?? {};
|
|
18535
18798
|
return useMemo(
|
|
18536
18799
|
() => deriveWidgetAccount({
|
|
18537
|
-
smartAccount
|
|
18538
|
-
|
|
18800
|
+
smartAccount: {
|
|
18801
|
+
smartAccountReady,
|
|
18802
|
+
smartAccountAddress,
|
|
18803
|
+
error,
|
|
18804
|
+
privyReady,
|
|
18805
|
+
privyAuthenticated,
|
|
18806
|
+
embeddedWalletCount
|
|
18807
|
+
},
|
|
18808
|
+
wallet: hasWallet ? { connected, address, hasWalletClient, reconnecting } : null,
|
|
18539
18809
|
sessionSmartAccountAddress,
|
|
18540
18810
|
walletUserPrivySession
|
|
18541
18811
|
}),
|
|
18542
18812
|
[
|
|
18543
|
-
|
|
18544
|
-
|
|
18545
|
-
|
|
18546
|
-
|
|
18547
|
-
|
|
18548
|
-
|
|
18549
|
-
|
|
18550
|
-
|
|
18551
|
-
|
|
18552
|
-
|
|
18813
|
+
smartAccountReady,
|
|
18814
|
+
smartAccountAddress,
|
|
18815
|
+
error,
|
|
18816
|
+
privyReady,
|
|
18817
|
+
privyAuthenticated,
|
|
18818
|
+
embeddedWalletCount,
|
|
18819
|
+
hasWallet,
|
|
18820
|
+
connected,
|
|
18821
|
+
address,
|
|
18822
|
+
hasWalletClient,
|
|
18823
|
+
reconnecting,
|
|
18553
18824
|
sessionSmartAccountAddress,
|
|
18554
18825
|
walletUserPrivySession
|
|
18555
18826
|
]
|
|
@@ -18611,7 +18882,7 @@ function useReviewPrompt(options) {
|
|
|
18611
18882
|
resolution.current?.reject(new FluentReviewRejectedError(label));
|
|
18612
18883
|
resolution.current = null;
|
|
18613
18884
|
setReview(null);
|
|
18614
|
-
}, []);
|
|
18885
|
+
}, [label]);
|
|
18615
18886
|
useEffect(
|
|
18616
18887
|
() => () => {
|
|
18617
18888
|
resolution.current?.reject(new Error(`Fluent ${label} review was closed`));
|
|
@@ -19283,7 +19554,10 @@ function useFluentDepositSwap({
|
|
|
19283
19554
|
commit(subjectKey, { phase: "bridge_failed", deposit: bridging, message: message2 });
|
|
19284
19555
|
track("bridge_deposit_swap_failed", { reason: "bridge_failed" });
|
|
19285
19556
|
} else if (arrival.status === "landed") {
|
|
19286
|
-
const landed =
|
|
19557
|
+
const landed = (
|
|
19558
|
+
// biome-ignore lint/complexity/useMathMinMax: both are bigint, which Math.min rejects
|
|
19559
|
+
arrival.received < bridging.expected ? arrival.received : bridging.expected
|
|
19560
|
+
);
|
|
19287
19561
|
commit(subjectKey, {
|
|
19288
19562
|
phase: "ready",
|
|
19289
19563
|
leg: {
|
|
@@ -19645,6 +19919,7 @@ function useZeroDevInitializer(params) {
|
|
|
19645
19919
|
}, [
|
|
19646
19920
|
smartAccount.embeddedWalletCount,
|
|
19647
19921
|
smartAccount.privyAuthenticated,
|
|
19922
|
+
smartAccount.privyReady,
|
|
19648
19923
|
smartAccount.refresh,
|
|
19649
19924
|
smartAccount.smartAccountReady
|
|
19650
19925
|
]);
|
|
@@ -20624,7 +20899,11 @@ function useUserSettings(params) {
|
|
|
20624
20899
|
function AccountAvatar({ userAvatarUrl, defaultLogoUrl, className }) {
|
|
20625
20900
|
const src = userAvatarUrl || defaultLogoUrl || void 0;
|
|
20626
20901
|
const [failedSrc, setFailedSrc] = useState(null);
|
|
20627
|
-
|
|
20902
|
+
const [renderedSrc, setRenderedSrc] = useState(src);
|
|
20903
|
+
if (renderedSrc !== src) {
|
|
20904
|
+
setRenderedSrc(src);
|
|
20905
|
+
setFailedSrc(null);
|
|
20906
|
+
}
|
|
20628
20907
|
if (!src || failedSrc === src) {
|
|
20629
20908
|
return /* @__PURE__ */ jsx(Icon, { name: "fluent", className: cn("size-3", className) });
|
|
20630
20909
|
}
|
|
@@ -20963,6 +21242,10 @@ function FluentWidgetConnectButton({
|
|
|
20963
21242
|
}
|
|
20964
21243
|
);
|
|
20965
21244
|
}
|
|
21245
|
+
var DefaultConnectButtonContext = createContext(null);
|
|
21246
|
+
function DefaultConnectButton() {
|
|
21247
|
+
return useContext(DefaultConnectButtonContext);
|
|
21248
|
+
}
|
|
20966
21249
|
function FluentConnectButtonSlot({
|
|
20967
21250
|
hasConnectedAccount,
|
|
20968
21251
|
connecting,
|
|
@@ -21001,9 +21284,13 @@ function FluentConnectButtonSlot({
|
|
|
21001
21284
|
onClick: onTopConnectClick,
|
|
21002
21285
|
openConnect,
|
|
21003
21286
|
openAccount,
|
|
21004
|
-
DefaultButton:
|
|
21287
|
+
DefaultButton: DefaultConnectButton
|
|
21005
21288
|
};
|
|
21006
|
-
|
|
21289
|
+
const appButton = renderConnectButton?.(connectButtonContext);
|
|
21290
|
+
if (appButton !== null && appButton !== void 0) {
|
|
21291
|
+
return /* @__PURE__ */ jsx(DefaultConnectButtonContext.Provider, { value: defaultConnectButton, children: appButton });
|
|
21292
|
+
}
|
|
21293
|
+
return connectButton === false ? null : connectButton === "inline" ? defaultConnectButton : /* @__PURE__ */ jsx("div", { className: "fixed top-5 right-5 z-50", children: defaultConnectButton });
|
|
21007
21294
|
}
|
|
21008
21295
|
function DebugPanel(props) {
|
|
21009
21296
|
const { session, wallet, walletStatus, loginError } = props;
|
|
@@ -21118,7 +21405,6 @@ function FluentWidgetContent({
|
|
|
21118
21405
|
const {
|
|
21119
21406
|
authenticated,
|
|
21120
21407
|
getAccessToken,
|
|
21121
|
-
login,
|
|
21122
21408
|
logout,
|
|
21123
21409
|
ready: privyReady,
|
|
21124
21410
|
unlinkPasskey,
|
|
@@ -21270,7 +21556,7 @@ function FluentWidgetContent({
|
|
|
21270
21556
|
return;
|
|
21271
21557
|
}
|
|
21272
21558
|
openConnectFlow();
|
|
21273
|
-
}, [hasConnectedAccount, openConnectFlow]);
|
|
21559
|
+
}, [hasConnectedAccount, openConnectFlow, setAccountOpen]);
|
|
21274
21560
|
const openConnect = useCallback(() => openConnectFlow(), [openConnectFlow]);
|
|
21275
21561
|
const handleDisconnect = useCallback(
|
|
21276
21562
|
async ({ awaitAuthSession }) => {
|
|
@@ -21310,9 +21596,12 @@ function FluentWidgetContent({
|
|
|
21310
21596
|
connectedPresentation,
|
|
21311
21597
|
getFluentConnect,
|
|
21312
21598
|
logout,
|
|
21599
|
+
resetInitialization,
|
|
21313
21600
|
resolvedConfig.network,
|
|
21601
|
+
setAccountOpen,
|
|
21314
21602
|
setDirectAuthRequested,
|
|
21315
|
-
setSession
|
|
21603
|
+
setSession,
|
|
21604
|
+
setWalletStatus
|
|
21316
21605
|
]
|
|
21317
21606
|
);
|
|
21318
21607
|
const requestDisconnect = useCallback(() => {
|
|
@@ -21423,14 +21712,19 @@ function FluentWidgetContent({
|
|
|
21423
21712
|
embeddedWalletCount,
|
|
21424
21713
|
getFluentConnect,
|
|
21425
21714
|
identityToken,
|
|
21715
|
+
resetInitialization,
|
|
21716
|
+
resolvedConfig.appId,
|
|
21426
21717
|
resolvedConfig.scopes,
|
|
21427
21718
|
session,
|
|
21428
21719
|
setDirectAuthRequested,
|
|
21720
|
+
setLoginError,
|
|
21429
21721
|
setSession,
|
|
21722
|
+
setWalletStatus,
|
|
21430
21723
|
smartAccount.error?.message,
|
|
21431
21724
|
smartAccount.kernel,
|
|
21432
21725
|
smartAccount.refresh,
|
|
21433
21726
|
smartAccount.signerAddress,
|
|
21727
|
+
track,
|
|
21434
21728
|
user,
|
|
21435
21729
|
walletUserPrivySession
|
|
21436
21730
|
]);
|
|
@@ -21439,16 +21733,7 @@ function FluentWidgetContent({
|
|
|
21439
21733
|
if (!privyReady || !authenticated) return;
|
|
21440
21734
|
if (embeddedWalletCount === 0) return;
|
|
21441
21735
|
completeDirectAuthorization();
|
|
21442
|
-
}, [
|
|
21443
|
-
authenticated,
|
|
21444
|
-
completeDirectAuthorization,
|
|
21445
|
-
embeddedWalletCount,
|
|
21446
|
-
identityToken,
|
|
21447
|
-
privyReady,
|
|
21448
|
-
session,
|
|
21449
|
-
smartAccount.smartAccountAddress,
|
|
21450
|
-
smartAccount.smartAccountReady
|
|
21451
|
-
]);
|
|
21736
|
+
}, [authenticated, completeDirectAuthorization, embeddedWalletCount, privyReady]);
|
|
21452
21737
|
const startDirectFluentLogin = useCallback(async () => {
|
|
21453
21738
|
setLoginError(null);
|
|
21454
21739
|
const live = privySessionNow.current;
|
|
@@ -21474,14 +21759,14 @@ function FluentWidgetContent({
|
|
|
21474
21759
|
setWalletStatus("Opening Fluent Connect ID");
|
|
21475
21760
|
setDirectAuthRequested(true);
|
|
21476
21761
|
setConnectOpen(true);
|
|
21477
|
-
}, [completeDirectAuthorization, setDirectAuthRequested]);
|
|
21762
|
+
}, [completeDirectAuthorization, setDirectAuthRequested, setLoginError, setWalletStatus]);
|
|
21478
21763
|
useEffect(() => {
|
|
21479
21764
|
if (inlineLoginRequest <= handledInlineLoginRequest.current) return;
|
|
21480
21765
|
handledInlineLoginRequest.current = inlineLoginRequest;
|
|
21481
21766
|
setLoginError(null);
|
|
21482
21767
|
setDirectAuthRequested(true);
|
|
21483
21768
|
setConnectOpen(true);
|
|
21484
|
-
}, [inlineLoginRequest, handledInlineLoginRequest, setDirectAuthRequested]);
|
|
21769
|
+
}, [inlineLoginRequest, handledInlineLoginRequest, setDirectAuthRequested, setLoginError]);
|
|
21485
21770
|
const handleConnectWithX = useCallback(async () => {
|
|
21486
21771
|
await handleDisconnect({ awaitAuthSession: false });
|
|
21487
21772
|
void startDirectFluentLogin().catch(() => void 0);
|
|
@@ -21551,7 +21836,8 @@ function FluentWidgetContent({
|
|
|
21551
21836
|
const pendingTransferCount = useRef(0);
|
|
21552
21837
|
const [sentTransfer, setSentTransfer] = useState(null);
|
|
21553
21838
|
const beginTransfer = useCallback((transfer) => {
|
|
21554
|
-
|
|
21839
|
+
pendingTransferCount.current += 1;
|
|
21840
|
+
const id = `pending-${pendingTransferCount.current}`;
|
|
21555
21841
|
setPendingTransfers((list) => [...list, { ...transfer, id }]);
|
|
21556
21842
|
setSentTransfer({ ...transfer, id });
|
|
21557
21843
|
setWalletMenuPanel("activity");
|
|
@@ -21583,9 +21869,11 @@ function FluentWidgetContent({
|
|
|
21583
21869
|
const addSentDeposit = useCallback((deposit) => {
|
|
21584
21870
|
setSentDeposits((list) => [...list, deposit]);
|
|
21585
21871
|
}, []);
|
|
21586
|
-
|
|
21872
|
+
const [sentDepositsAccount, setSentDepositsAccount] = useState(fluentAccountAddress);
|
|
21873
|
+
if (sentDepositsAccount !== fluentAccountAddress) {
|
|
21874
|
+
setSentDepositsAccount(fluentAccountAddress);
|
|
21587
21875
|
setSentDeposits([]);
|
|
21588
|
-
}
|
|
21876
|
+
}
|
|
21589
21877
|
const openSendPage = useCallback(() => {
|
|
21590
21878
|
setWalletMenuTab("send");
|
|
21591
21879
|
setAccountOpen(true);
|
|
@@ -21891,14 +22179,14 @@ function FluentWidgetContent({
|
|
|
21891
22179
|
logout
|
|
21892
22180
|
};
|
|
21893
22181
|
const linkXSiwe = useRef(null);
|
|
21894
|
-
const linkXSiweOrRefuse = () => {
|
|
22182
|
+
const linkXSiweOrRefuse = useCallback(() => {
|
|
21895
22183
|
const source = linkXSiwe.current;
|
|
21896
22184
|
if (source) return source;
|
|
21897
22185
|
throw new FluentAuthError(
|
|
21898
22186
|
"link_failed",
|
|
21899
22187
|
"A Fluent ID is signed in on this page. Linking X for the connected external wallet would sign it out; disconnect the Fluent ID first, or link X as the Fluent ID."
|
|
21900
22188
|
);
|
|
21901
|
-
};
|
|
22189
|
+
}, []);
|
|
21902
22190
|
const linkXReturnState = (subject) => {
|
|
21903
22191
|
const live = linkXInputs.current;
|
|
21904
22192
|
const privyRestored = live.authenticated && live.privyUserId !== void 0;
|
|
@@ -21947,8 +22235,6 @@ function FluentWidgetContent({
|
|
|
21947
22235
|
linkXReturnWaiter.current = { subject, settle };
|
|
21948
22236
|
settleLinkXReturnFor(subject);
|
|
21949
22237
|
}),
|
|
21950
|
-
// As for the effect: the conditions are read from the ref, not captured.
|
|
21951
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21952
22238
|
[]
|
|
21953
22239
|
);
|
|
21954
22240
|
const linkX = useCallback(async () => {
|
|
@@ -21989,14 +22275,14 @@ function FluentWidgetContent({
|
|
|
21989
22275
|
loginWithSiwe: (input) => {
|
|
21990
22276
|
const logins = linkXSiweLogins.current;
|
|
21991
22277
|
logins.pending = true;
|
|
21992
|
-
let
|
|
22278
|
+
let login;
|
|
21993
22279
|
try {
|
|
21994
|
-
|
|
22280
|
+
login = linkXSiweOrRefuse().loginWithSiwe(input);
|
|
21995
22281
|
} catch (err) {
|
|
21996
22282
|
logins.pending = false;
|
|
21997
22283
|
throw err;
|
|
21998
22284
|
}
|
|
21999
|
-
void
|
|
22285
|
+
void login.then(
|
|
22000
22286
|
(signedIn) => {
|
|
22001
22287
|
if (typeof signedIn?.id === "string") logins.userIds.add(signedIn.id);
|
|
22002
22288
|
logins.pending = false;
|
|
@@ -22006,7 +22292,7 @@ function FluentWidgetContent({
|
|
|
22006
22292
|
}
|
|
22007
22293
|
);
|
|
22008
22294
|
return bounded(
|
|
22009
|
-
|
|
22295
|
+
login,
|
|
22010
22296
|
LINK_X_SIWE_STEP_TIMEOUT_MS,
|
|
22011
22297
|
siweStepTimedOut("sign the wallet in")
|
|
22012
22298
|
);
|
|
@@ -22020,7 +22306,13 @@ function FluentWidgetContent({
|
|
|
22020
22306
|
linkTwitter: linkTwitterForLinkX,
|
|
22021
22307
|
storage
|
|
22022
22308
|
});
|
|
22023
|
-
}, [
|
|
22309
|
+
}, [
|
|
22310
|
+
awaitLinkXReturn,
|
|
22311
|
+
linkTwitterForLinkX,
|
|
22312
|
+
linkXSiweOrRefuse,
|
|
22313
|
+
logoutPrivyForLinkX,
|
|
22314
|
+
resolvedConfig.publicApiUrl
|
|
22315
|
+
]);
|
|
22024
22316
|
const sessionPrivyUserId = session?.user?.id;
|
|
22025
22317
|
const fluentIdRebuilding = Boolean(sessionPrivyUserId) && smartAccount.smartAccountEnabled && !derivedAccount.fluentAccountReady;
|
|
22026
22318
|
const settingsAccountKind = fluentIdRebuilding ? void 0 : widgetAccount.type;
|