@pollar/react 0.12.1-rc.18 → 0.12.1-rc.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1311,7 +1311,7 @@ var PollarModalFooter = ({ language: languageProp }) => {
1311
1311
  /* @__PURE__ */ jsxRuntime.jsx("img", { src: LOGO_POLLAR_WORDMARK_ON_DARK, alt: "Pollar", className: "pollar-footer-logo pollar-logo-on-dark" }),
1312
1312
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "pollar-footer-version", children: [
1313
1313
  "v",
1314
- "0.12.1-rc.18"
1314
+ "0.12.1-rc.19"
1315
1315
  ] })
1316
1316
  ] });
1317
1317
  };
@@ -2160,11 +2160,52 @@ function ChainSelect({ label, value, options, onChange, disabled = false, langua
2160
2160
  disabled,
2161
2161
  "aria-label": label ?? COMMONS_COPY[language].network,
2162
2162
  onChange: (chain) => onChange(chain),
2163
- options: options.map((chain) => ({ value: chain, label: CHAIN_LABEL[chain] ?? chain }))
2163
+ options: options.map((chain) => ({
2164
+ value: chain,
2165
+ label: CHAIN_LABEL[chain] ?? chain,
2166
+ icon: /* @__PURE__ */ jsxRuntime.jsx(ChainLogo, { chain })
2167
+ }))
2164
2168
  }
2165
2169
  )
2166
2170
  ] });
2167
2171
  }
2172
+ function ChainLogo({ chain }) {
2173
+ const src = CHAIN_LOGOS[chain];
2174
+ return src ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: "pollar-network-logo", src, alt: "", "aria-hidden": true }) : null;
2175
+ }
2176
+ function NetworkPill({
2177
+ value,
2178
+ options,
2179
+ onChange,
2180
+ locked = false,
2181
+ disabled = false,
2182
+ language: languageProp
2183
+ }) {
2184
+ const language = useInheritedLanguage(languageProp);
2185
+ if (!value || options.length < 2) return null;
2186
+ const label = COMMONS_COPY[language].network;
2187
+ if (locked) {
2188
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "pollar-network-tag", title: label, children: [
2189
+ /* @__PURE__ */ jsxRuntime.jsx(ChainLogo, { chain: value }),
2190
+ CHAIN_LABEL[value] ?? value
2191
+ ] });
2192
+ }
2193
+ return /* @__PURE__ */ jsxRuntime.jsx(
2194
+ PollarSelect,
2195
+ {
2196
+ className: "pollar-network-pill",
2197
+ "aria-label": label,
2198
+ value,
2199
+ disabled,
2200
+ onChange: (chain) => onChange?.(chain),
2201
+ options: options.map((chain) => ({
2202
+ value: chain,
2203
+ label: CHAIN_LABEL[chain] ?? chain,
2204
+ icon: /* @__PURE__ */ jsxRuntime.jsx(ChainLogo, { chain })
2205
+ }))
2206
+ }
2207
+ );
2208
+ }
2168
2209
 
2169
2210
  // src/useChains.ts
2170
2211
  function useChains() {
@@ -2892,9 +2933,6 @@ function AssetLogo({ asset, small = false }) {
2892
2933
  if (url && !failed) return /* @__PURE__ */ jsxRuntime.jsx("img", { className: `pollar-txr-logo${size}`, src: url, alt: asset, onError: () => setFailed(true) });
2893
2934
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `pollar-txr-logo pollar-txr-logo-initial${size}`, "aria-hidden": true, children: asset.slice(0, 1).toUpperCase() });
2894
2935
  }
2895
- function ChainLogo({ chain }) {
2896
- return /* @__PURE__ */ jsxRuntime.jsx("img", { className: "pollar-txr-chain-inline", src: CHAIN_LOGOS[chain], alt: "", "aria-hidden": true });
2897
- }
2898
2936
  function AccountGlyph() {
2899
2937
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pollar-txr-logo pollar-txr-logo-glyph", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", children: [
2900
2938
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "10", cy: "7", r: "3.25", stroke: "currentColor", strokeWidth: "1.6" }),
@@ -3334,7 +3372,10 @@ function EnabledAssetsModalTemplate({
3334
3372
  children: [
3335
3373
  isLoading && data && /* @__PURE__ */ jsxRuntime.jsx(BusyOverlay, { label: copy.refreshing }),
3336
3374
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header", children: [
3337
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: copy.title }),
3375
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-title-row", children: [
3376
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: copy.title }),
3377
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkPill, { value: selectedChain, options: chains, onChange: onSelectChain, disabled: isLoading || busy })
3378
+ ] }),
3338
3379
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header-actions", children: [
3339
3380
  /* @__PURE__ */ jsxRuntime.jsx(
3340
3381
  "button",
@@ -3371,16 +3412,6 @@ function EnabledAssetsModalTemplate({
3371
3412
  /* @__PURE__ */ jsxRuntime.jsx("button", { className: "pollar-modal-close", onClick: onClose, "aria-label": copy.close, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 2l12 12M14 2L2 14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) })
3372
3413
  ] })
3373
3414
  ] }),
3374
- /* @__PURE__ */ jsxRuntime.jsx(
3375
- ChainSelect,
3376
- {
3377
- label: copy.network,
3378
- value: selectedChain,
3379
- options: chains,
3380
- onChange: onSelectChain,
3381
- disabled: isLoading || busy
3382
- }
3383
- ),
3384
3415
  walletAddress && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-address-row", children: [
3385
3416
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pollar-address", children: cropAddress(walletAddress) }),
3386
3417
  /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { value: walletAddress, label: copy.copyWalletAddress })
@@ -8146,10 +8177,12 @@ function ReceiveModalTemplate({
8146
8177
  onClick: (e) => e.stopPropagation(),
8147
8178
  children: [
8148
8179
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header", children: [
8149
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: copy.title }),
8180
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-title-row", children: [
8181
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: copy.title }),
8182
+ chains && onSelectChain && /* @__PURE__ */ jsxRuntime.jsx(NetworkPill, { value: selectedChain, options: chains, onChange: onSelectChain })
8183
+ ] }),
8150
8184
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pollar-modal-header-actions", children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "pollar-modal-close", onClick: onClose, "aria-label": copy.close, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 2l12 12M14 2L2 14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) }) })
8151
8185
  ] }),
8152
- chains && onSelectChain && /* @__PURE__ */ jsxRuntime.jsx(ChainSelect, { label: copy.network, value: selectedChain, options: chains, onChange: onSelectChain }),
8153
8186
  recoveryLocked ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-receive-locked", role: "alert", children: [
8154
8187
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: copy.locked }),
8155
8188
  onSetupRecovery && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "pollar-receive-copy-btn", onClick: onSetupRecovery, children: copy.setupRecovery })
@@ -8916,7 +8949,20 @@ function SendModalTemplate({
8916
8949
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-send-header-left", children: [
8917
8950
  showBack && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "pollar-modal-close", onClick: onBack, "aria-label": copy.back, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 3L5 8l5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
8918
8951
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-send-title-copy", children: [
8919
- step === "tx" ? /* @__PURE__ */ jsxRuntime.jsx(TxStatusHeading, { review: txReview, fallback: title }) : /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: title }),
8952
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-title-row", children: [
8953
+ step === "tx" ? /* @__PURE__ */ jsxRuntime.jsx(TxStatusHeading, { review: txReview, fallback: title }) : /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: title }),
8954
+ chains && /* @__PURE__ */ jsxRuntime.jsx(
8955
+ NetworkPill,
8956
+ {
8957
+ value: selectedChain,
8958
+ options: chains,
8959
+ ...onSelectChain ? { onChange: onSelectChain } : {},
8960
+ locked: step !== "form",
8961
+ disabled: isLoadingBalance,
8962
+ language
8963
+ }
8964
+ )
8965
+ ] }),
8920
8966
  step === "form" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "pollar-send-subtitle", children: copy.subtitle.replace("{chain}", chainLabel(selectedChain, copy)) })
8921
8967
  ] })
8922
8968
  ] }),
@@ -8937,16 +8983,6 @@ function SendModalTemplate({
8937
8983
  ] })
8938
8984
  ] }),
8939
8985
  step === "form" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8940
- chains && onSelectChain && /* @__PURE__ */ jsxRuntime.jsx(
8941
- ChainSelect,
8942
- {
8943
- label: copy.network,
8944
- value: selectedChain,
8945
- options: chains,
8946
- onChange: onSelectChain,
8947
- disabled: isLoadingBalance
8948
- }
8949
- ),
8950
8986
  !canSendOnChain && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pollar-modal-empty", children: copy.sendingUnavailable }),
8951
8987
  canSendOnChain && notReadyReason && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pollar-modal-empty", children: notReadyReason }),
8952
8988
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -9779,7 +9815,19 @@ function SwapModalTemplate({
9779
9815
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header", children: [
9780
9816
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-send-header-left", children: [
9781
9817
  showBack && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "pollar-modal-close", onClick: onBack, "aria-label": copy.back, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 3 5 8l5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
9782
- step === "tx" ? /* @__PURE__ */ jsxRuntime.jsx(TxStatusHeading, { review: txReview, fallback: title }) : /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: title })
9818
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-title-row", children: [
9819
+ step === "tx" ? /* @__PURE__ */ jsxRuntime.jsx(TxStatusHeading, { review: txReview, fallback: title }) : /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: title }),
9820
+ /* @__PURE__ */ jsxRuntime.jsx(
9821
+ NetworkPill,
9822
+ {
9823
+ value: chain,
9824
+ options: chains,
9825
+ onChange: (value) => onChainChange(value),
9826
+ locked: step === "tx",
9827
+ disabled: configLoading || isLoadingData
9828
+ }
9829
+ )
9830
+ ] })
9783
9831
  ] }),
9784
9832
  !isInProgress && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header-actions", children: [
9785
9833
  step === "form" && /* @__PURE__ */ jsxRuntime.jsx(
@@ -9799,20 +9847,6 @@ function SwapModalTemplate({
9799
9847
  ] }),
9800
9848
  step === "form" && !configLoading && swapUnavailable && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pollar-modal-error", children: copy.unavailable }),
9801
9849
  step === "form" && !swapUnavailable && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9802
- chains.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "pollar-swap-route-wrap pollar-swap-chain-wrap", children: [
9803
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: copy.network }),
9804
- /* @__PURE__ */ jsxRuntime.jsx(
9805
- PollarSelect,
9806
- {
9807
- className: "pollar-swap-route-pill",
9808
- "aria-label": copy.network,
9809
- value: chain,
9810
- disabled: configLoading || isLoadingData,
9811
- onChange: (value) => onChainChange(value),
9812
- options: chains.map((c) => ({ value: c, label: CHAIN_LABELS[c] }))
9813
- }
9814
- )
9815
- ] }),
9816
9850
  destinations.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "pollar-swap-route-wrap pollar-swap-chain-wrap", children: [
9817
9851
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: copy.receiveOn }),
9818
9852
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -9823,7 +9857,11 @@ function SwapModalTemplate({
9823
9857
  value: destination,
9824
9858
  disabled: configLoading || isLoadingData,
9825
9859
  onChange: (value) => onDestinationChange?.(value),
9826
- options: destinations.map((c) => ({ value: c, label: `${copy.receiveOn} ${CHAIN_LABELS[c]}` }))
9860
+ options: destinations.map((c) => ({
9861
+ value: c,
9862
+ label: `${copy.receiveOn} ${CHAIN_LABELS[c]}`,
9863
+ icon: /* @__PURE__ */ jsxRuntime.jsx(ChainLogo, { chain: c })
9864
+ }))
9827
9865
  }
9828
9866
  )
9829
9867
  ] }),
@@ -9861,7 +9899,7 @@ function SwapModalTemplate({
9861
9899
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "pollar-swap-balance", children: [
9862
9900
  copy.balance,
9863
9901
  " ",
9864
- formatAmount2(selectedSell?.available)
9902
+ formatAmount2(sellOptions.some((o) => assetOptionKey(o) === sellKey) ? selectedSell?.available : void 0)
9865
9903
  ] }),
9866
9904
  /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, children: "\xB7" }),
9867
9905
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -10297,7 +10335,10 @@ function SwapModal({ onClose, initial }) {
10297
10335
  (o) => optKey(o) !== buyKeyOfSell || optKey(o) === (selectedBuy ? optKey(selectedBuy) : "")
10298
10336
  );
10299
10337
  react.useEffect(() => {
10300
- if (sellOptions.length === 0) return;
10338
+ if (sellOptions.length === 0) {
10339
+ if (selectedSell && !isLoadingData) setSelectedSell(null);
10340
+ return;
10341
+ }
10301
10342
  const seeded = byCode(sellOptions, sellSeed.current);
10302
10343
  if (seeded) {
10303
10344
  sellSeed.current = void 0;
@@ -10307,9 +10348,12 @@ function SwapModal({ onClose, initial }) {
10307
10348
  if (!selectedSell || !sellOptions.some((o) => optKey(o) === optKey(selectedSell))) {
10308
10349
  setSelectedSell(sellOptions[0]);
10309
10350
  }
10310
- }, [sellOptions, selectedSell]);
10351
+ }, [sellOptions, selectedSell, isLoadingData]);
10311
10352
  react.useEffect(() => {
10312
- if (buyOptions.length === 0) return;
10353
+ if (buyOptions.length === 0) {
10354
+ if (selectedBuy && !isLoadingData) setSelectedBuy(null);
10355
+ return;
10356
+ }
10313
10357
  const seeded = byCode(buyOptions, buySeed.current);
10314
10358
  if (seeded) {
10315
10359
  buySeed.current = void 0;
@@ -10319,7 +10363,7 @@ function SwapModal({ onClose, initial }) {
10319
10363
  if (!selectedBuy || !buyOptions.some((o) => optKey(o) === optKey(selectedBuy))) {
10320
10364
  setSelectedBuy(buyOptions[0]);
10321
10365
  }
10322
- }, [buyOptions, selectedBuy]);
10366
+ }, [buyOptions, selectedBuy, isLoadingData]);
10323
10367
  function addCustomToken(code, issuer) {
10324
10368
  const c = code.trim().toUpperCase();
10325
10369
  const i = issuer.trim();
@@ -11837,7 +11881,23 @@ function EarnModal({ onClose, initial }) {
11837
11881
  }),
11838
11882
  fallback: title
11839
11883
  }
11840
- ) : /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: title })
11884
+ ) : /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: title }),
11885
+ /* @__PURE__ */ jsxRuntime.jsx(
11886
+ NetworkPill,
11887
+ {
11888
+ value: earnChain,
11889
+ options: networks,
11890
+ locked: step === "tx",
11891
+ onChange: (n) => {
11892
+ if (n === earnChain) return;
11893
+ setEarnChain(n);
11894
+ setOpportunityId("");
11895
+ setAmount("");
11896
+ setFormError("");
11897
+ },
11898
+ language
11899
+ }
11900
+ )
11841
11901
  ] }),
11842
11902
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header-actions", children: [
11843
11903
  step === "form" && !earnUnavailable && !smartUnsupported && /* @__PURE__ */ jsxRuntime.jsx(
@@ -11905,32 +11965,6 @@ function EarnModal({ onClose, initial }) {
11905
11965
  }
11906
11966
  )
11907
11967
  ] }),
11908
- networks.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-send-field", children: [
11909
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pollar-send-label", children: copy.network }),
11910
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pollar-tabs pollar-earn-networks", role: "radiogroup", "aria-label": copy.network, children: networks.map((n) => /* @__PURE__ */ jsxRuntime.jsxs(
11911
- "button",
11912
- {
11913
- type: "button",
11914
- role: "radio",
11915
- "aria-checked": earnChain === n,
11916
- className: "pollar-tab pollar-earn-network",
11917
- "data-active": earnChain === n,
11918
- "data-chain": n,
11919
- onClick: () => {
11920
- if (n === earnChain) return;
11921
- setEarnChain(n);
11922
- setOpportunityId("");
11923
- setAmount("");
11924
- setFormError("");
11925
- },
11926
- children: [
11927
- /* @__PURE__ */ jsxRuntime.jsx(ChainLogo, { chain: n }),
11928
- reviewCopy.chains[n]
11929
- ]
11930
- },
11931
- n
11932
- )) })
11933
- ] }),
11934
11968
  !onSolana && providers && providers.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-send-field", children: [
11935
11969
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "pollar-send-label", children: copy.provider }),
11936
11970
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -15477,7 +15511,10 @@ function TxHistoryModalTemplate({
15477
15511
  onClick: (e) => e.stopPropagation(),
15478
15512
  children: [
15479
15513
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header", children: [
15480
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: copy.title }),
15514
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-title-row", children: [
15515
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: copy.title }),
15516
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkPill, { value: selectedChain, options: chains, onChange: onSelectChain, disabled: isLoading })
15517
+ ] }),
15481
15518
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header-actions", children: [
15482
15519
  /* @__PURE__ */ jsxRuntime.jsx(
15483
15520
  "button",
@@ -15514,7 +15551,6 @@ function TxHistoryModalTemplate({
15514
15551
  /* @__PURE__ */ jsxRuntime.jsx("button", { className: "pollar-modal-close", onClick: onClose, "aria-label": copy.close, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 2l12 12M14 2L2 14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) })
15515
15552
  ] })
15516
15553
  ] }),
15517
- /* @__PURE__ */ jsxRuntime.jsx(ChainSelect, { label: copy.network, value: selectedChain, options: chains, onChange: onSelectChain, disabled: isLoading }),
15518
15554
  walletAddress && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-address-row", children: [
15519
15555
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pollar-address", children: cropAddress(walletAddress) }),
15520
15556
  /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { value: walletAddress, label: copy.copyWalletAddress })
@@ -15823,7 +15859,10 @@ function WalletBalanceModalTemplate({
15823
15859
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-card pollar-bal-modal", "data-theme": theme, style: cssVars, onClick: (e) => e.stopPropagation(), children: [
15824
15860
  isLoading && data && /* @__PURE__ */ jsxRuntime.jsx(BusyOverlay, { label: copy.refreshing }),
15825
15861
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header", children: [
15826
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: copy.title }),
15862
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-title-row", children: [
15863
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "pollar-modal-title", children: copy.title }),
15864
+ chains && onSelectChain && /* @__PURE__ */ jsxRuntime.jsx(NetworkPill, { value: selectedChain, options: chains, onChange: onSelectChain, disabled: isLoading })
15865
+ ] }),
15827
15866
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-modal-header-actions", children: [
15828
15867
  /* @__PURE__ */ jsxRuntime.jsx(
15829
15868
  "button",
@@ -15840,16 +15879,6 @@ function WalletBalanceModalTemplate({
15840
15879
  /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "pollar-modal-close", onClick: onClose, "aria-label": copy.close, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 2l12 12M14 2L2 14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) })
15841
15880
  ] })
15842
15881
  ] }),
15843
- chains && onSelectChain && /* @__PURE__ */ jsxRuntime.jsx(
15844
- ChainSelect,
15845
- {
15846
- label: copy.network,
15847
- value: selectedChain,
15848
- options: chains,
15849
- onChange: onSelectChain,
15850
- disabled: isLoading
15851
- }
15852
- ),
15853
15882
  walletAddress && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-address-row", children: [
15854
15883
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pollar-address", children: cropAddress(walletAddress) }),
15855
15884
  /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { value: walletAddress, label: copy.copyWalletAddress })