@fluent.xyz/connect 0.8.4 → 0.8.5

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
@@ -5626,7 +5626,7 @@ function createFluentConnectForWidget(config) {
5626
5626
  }
5627
5627
 
5628
5628
  // package.json
5629
- var version = "0.8.4";
5629
+ var version = "0.8.5";
5630
5630
 
5631
5631
  // src/core/analytics.ts
5632
5632
  var INSTANCE_NAME = "fluent";
@@ -13035,11 +13035,12 @@ function WalletMenuActionCard({
13035
13035
  const faucetAvailable = isFaucetNetwork(resolvedConfig.network);
13036
13036
  const faucetOffered = faucetAvailable && !externalWalletAccount;
13037
13037
  const usdnrMinter = faucetAvailable ? onMintUsdnr : void 0;
13038
+ const accountAddress = connectedAddress ?? actionAddress;
13038
13039
  const swapperReady = resolvedConfig.swapper.enabled && Boolean(resolvedConfig.swapper.integratorId) && Boolean(resolvedConfig.swapper.dstChainId) && Boolean(resolvedConfig.swapper.dstTokenAddress);
13039
13040
  const handleSwapper = () => {
13040
13041
  setActionStatus(null);
13041
- if (!actionAddress) {
13042
- setActionStatus("Fluent ID is still preparing");
13042
+ if (!accountAddress) {
13043
+ setActionStatus("Wallet address is still preparing");
13043
13044
  return;
13044
13045
  }
13045
13046
  if (!swapperReady) {
@@ -13050,7 +13051,9 @@ function WalletMenuActionCard({
13050
13051
  integratorId: resolvedConfig.swapper.integratorId,
13051
13052
  dstChainId: resolvedConfig.swapper.dstChainId,
13052
13053
  dstTokenAddr: resolvedConfig.swapper.dstTokenAddress,
13053
- depositWalletAddress: actionAddress,
13054
+ // Not the Fluent ID's address: an External wallet has none, and USDnr bought to an
13055
+ // address other than the one the balances are read for never shows in this menu.
13056
+ depositWalletAddress: accountAddress,
13054
13057
  styles: {
13055
13058
  themeMode: "dark",
13056
13059
  componentStyles: {
@@ -13061,9 +13064,9 @@ function WalletMenuActionCard({
13061
13064
  }
13062
13065
  });
13063
13066
  };
13064
- const [swapperAccount, setSwapperAccount] = useState(actionAddress);
13065
- if (swapperAccount !== actionAddress) {
13066
- setSwapperAccount(actionAddress);
13067
+ const [swapperAccount, setSwapperAccount] = useState(accountAddress);
13068
+ if (swapperAccount !== accountAddress) {
13069
+ setSwapperAccount(accountAddress);
13067
13070
  setSwapperConfig(null);
13068
13071
  }
13069
13072
  const explorerTarget = externalWalletAccount ? connectedAddress : actionAddress;
@@ -13077,7 +13080,6 @@ function WalletMenuActionCard({
13077
13080
  }
13078
13081
  openExternalUrl(explorerAddress(explorerTarget, resolvedConfig.network), "explorer", track);
13079
13082
  };
13080
- const accountAddress = connectedAddress ?? actionAddress;
13081
13083
  const handleSend = () => {
13082
13084
  setActionStatus(null);
13083
13085
  if (!accountAddress) {
@@ -13468,7 +13470,7 @@ function WalletMenuActionCard({
13468
13470
  {
13469
13471
  variant: "secondary",
13470
13472
  className: "h-16 w-full",
13471
- disabled: usdnrMinter ? mintUsdnrBusy : !actionAddress || !swapperReady,
13473
+ disabled: usdnrMinter ? mintUsdnrBusy : !accountAddress || !swapperReady,
13472
13474
  title: usdnrMinter || swapperReady ? void 0 : "Not configured for this app",
13473
13475
  onClick: usdnrMinter ? () => handleMintUsdnr(usdnrMinter) : handleSwapper,
13474
13476
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [