@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.
@@ -394,7 +394,7 @@ function getBalanceFromWallet(connectedWallets, chain, symbol, address) {
394
394
  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;
395
395
  }
396
396
  function isAccountAndWalletMatched(account, connectedWallet) {
397
- return account.address === connectedWallet.address && account.chain === connectedWallet.chain && account.walletType === connectedWallet.walletType;
397
+ return account.address === connectedWallet.address && account.chain === connectedWallet.chain;
398
398
  }
399
399
  function makeBalanceFor(wallet, retrivedBalance, tokens) {
400
400
  const {
@@ -805,7 +805,7 @@ const useWalletsStore = /*#__PURE__*/createSelectors( /*#__PURE__*/create()( /*#
805
805
  connectWallet: accounts => {
806
806
  const getOneOfWalletsDetails = get().getOneOfWalletsDetails;
807
807
  set(state => ({
808
- connectedWallets: state.connectedWallets.concat(accounts.map(account => ({
808
+ connectedWallets: state.connectedWallets.filter(wallet => wallet.walletType !== accounts[0].walletType).concat(accounts.map(account => ({
809
809
  balances: [],
810
810
  address: account.address,
811
811
  chain: account.chain,
@@ -2595,7 +2595,7 @@ function SettingsPage(_ref) {
2595
2595
  liquiditySources: supportedUniqueSwappersGroups,
2596
2596
  selectedLiquiditySources: supportedUniqueSwappersGroups.filter(s => s.selected),
2597
2597
  singleTheme: singleTheme,
2598
- customSlippage: customSlippage || NaN,
2598
+ customSlippage: customSlippage,
2599
2599
  onCustomSlippageChange: setCustomSlippage,
2600
2600
  minSlippage: MIN_SLIPPGAE,
2601
2601
  maxSlippage: MAX_SLIPPAGE,