@rango-dev/widget-embedded 0.1.16-next.11 → 0.1.16-next.13

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.
@@ -402,7 +402,7 @@ function getBalanceFromWallet(connectedWallets, chain, symbol, address) {
402
402
  return selectedChainWallets.map(wallet => wallet.balances?.find(balance => address !== null && balance.address === address || address === null && balance.address === address && balance.symbol === symbol) || null).filter(balance => balance !== null).sort((a, b) => parseFloat(b?.amount || '0') - parseFloat(a?.amount || '1')).find(() => true) || null;
403
403
  }
404
404
  function isAccountAndWalletMatched(account, connectedWallet) {
405
- return account.address === connectedWallet.address && account.chain === connectedWallet.chain && account.walletType === connectedWallet.walletType;
405
+ return account.address === connectedWallet.address && account.chain === connectedWallet.chain;
406
406
  }
407
407
  function makeBalanceFor(wallet, retrivedBalance, tokens) {
408
408
  const {
@@ -813,7 +813,7 @@ const useWalletsStore = /*#__PURE__*/createSelectors( /*#__PURE__*/zustand.creat
813
813
  connectWallet: accounts => {
814
814
  const getOneOfWalletsDetails = get().getOneOfWalletsDetails;
815
815
  set(state => ({
816
- connectedWallets: state.connectedWallets.concat(accounts.map(account => ({
816
+ connectedWallets: state.connectedWallets.filter(wallet => wallet.walletType !== accounts[0].walletType).concat(accounts.map(account => ({
817
817
  balances: [],
818
818
  address: account.address,
819
819
  chain: account.chain,
@@ -2603,7 +2603,7 @@ function SettingsPage(_ref) {
2603
2603
  liquiditySources: supportedUniqueSwappersGroups,
2604
2604
  selectedLiquiditySources: supportedUniqueSwappersGroups.filter(s => s.selected),
2605
2605
  singleTheme: singleTheme,
2606
- customSlippage: customSlippage || NaN,
2606
+ customSlippage: customSlippage,
2607
2607
  onCustomSlippageChange: setCustomSlippage,
2608
2608
  minSlippage: MIN_SLIPPGAE,
2609
2609
  maxSlippage: MAX_SLIPPAGE,