@rango-dev/widget-embedded 0.1.16-next.9 → 0.1.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.1.16-next.9",
3
+ "version": "0.1.16",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -24,13 +24,13 @@
24
24
  "trailingComma": "es5"
25
25
  },
26
26
  "dependencies": {
27
- "@rango-dev/provider-all": "^0.1.14-next.4",
28
- "@rango-dev/queue-manager-core": "^0.1.13-next.0",
29
- "@rango-dev/queue-manager-rango-preset": "^0.1.13-next.1",
30
- "@rango-dev/queue-manager-react": "^0.1.11",
31
- "@rango-dev/ui": "^0.1.14-next.1",
32
- "@rango-dev/wallets-core": "^0.1.14-next.0",
33
- "@rango-dev/wallets-shared": "^0.1.13-next.0",
27
+ "@rango-dev/provider-all": "^0.1.14",
28
+ "@rango-dev/queue-manager-core": "^0.1.13",
29
+ "@rango-dev/queue-manager-rango-preset": "^0.1.13",
30
+ "@rango-dev/queue-manager-react": "^0.1.12",
31
+ "@rango-dev/ui": "^0.1.14",
32
+ "@rango-dev/wallets-core": "^0.1.13",
33
+ "@rango-dev/wallets-shared": "^0.1.13",
34
34
  "bignumber.js": "^9.1.1",
35
35
  "copy-to-clipboard": "^3.3.3",
36
36
  "dayjs": "^1.11.7",
@@ -40,8 +40,8 @@
40
40
  "immer": "^9.0.19",
41
41
  "mitt": "^3.0.0",
42
42
  "parcel": "^2.8.0",
43
- "rango-sdk": "^0.1.23",
44
- "rango-types": "^0.1.28",
43
+ "rango-sdk": "^0.1.27",
44
+ "rango-types": "^0.1.32",
45
45
  "react": "^18.2.0",
46
46
  "react-dom": "^18.2.0",
47
47
  "react-i18next": "^12.2.0",
@@ -7,7 +7,7 @@ import usePrevious from './usePrevious';
7
7
 
8
8
  export function useTheme({
9
9
  colors: themeColors,
10
- fontFamily = 'Robot',
10
+ fontFamily = 'Roboto',
11
11
  borderRadius = 8,
12
12
  mode = 'auto',
13
13
  }: WidgetTheme) {
@@ -42,7 +42,7 @@ export function useTheme({
42
42
  foreground,
43
43
  };
44
44
 
45
- const customeLightTheme = createTheme({
45
+ const customLightTheme = createTheme({
46
46
  colors: lightColors,
47
47
  radii: {
48
48
  5: `${borderRadius}px`,
@@ -54,7 +54,7 @@ export function useTheme({
54
54
  },
55
55
  });
56
56
 
57
- const customeDarkTheme = createTheme({
57
+ const customDarkTheme = createTheme({
58
58
  colors: {
59
59
  ...lightColors,
60
60
  ...generateRangeColors('neutral', 'dark', '#111111'),
@@ -114,8 +114,8 @@ export function useTheme({
114
114
 
115
115
  const getActiveTheme = () => {
116
116
  if (theme === 'auto')
117
- return OSTheme === 'dark' ? customeDarkTheme : customeLightTheme;
118
- else return theme === 'dark' ? customeDarkTheme : customeLightTheme;
117
+ return OSTheme === 'dark' ? customDarkTheme : customLightTheme;
118
+ else return theme === 'dark' ? customDarkTheme : customLightTheme;
119
119
  };
120
120
 
121
121
  return { activeTheme: getActiveTheme() };
@@ -79,7 +79,7 @@ export function SettingsPage({ supportedSwappers, singleTheme }: PropTypes) {
79
79
  (s) => s.selected
80
80
  )}
81
81
  singleTheme={singleTheme}
82
- customSlippage={customSlippage || NaN}
82
+ customSlippage={customSlippage}
83
83
  onCustomSlippageChange={setCustomSlippage}
84
84
  minSlippage={MIN_SLIPPGAE}
85
85
  maxSlippage={MAX_SLIPPAGE}
@@ -55,17 +55,19 @@ export const useWalletsStore = createSelectors(
55
55
  connectWallet: (accounts) => {
56
56
  const getOneOfWalletsDetails = get().getOneOfWalletsDetails;
57
57
  set((state) => ({
58
- connectedWallets: state.connectedWallets.concat(
59
- accounts.map((account) => ({
60
- balances: [],
61
- address: account.address,
62
- chain: account.chain,
63
- loading: true,
64
- walletType: account.walletType,
65
- error: false,
66
- explorerUrl: null,
67
- }))
68
- ),
58
+ connectedWallets: state.connectedWallets
59
+ .filter((wallet) => wallet.walletType !== accounts[0].walletType)
60
+ .concat(
61
+ accounts.map((account) => ({
62
+ balances: [],
63
+ address: account.address,
64
+ chain: account.chain,
65
+ loading: true,
66
+ walletType: account.walletType,
67
+ error: false,
68
+ explorerUrl: null,
69
+ }))
70
+ ),
69
71
  }));
70
72
  accounts.forEach(async (account) => getOneOfWalletsDetails(account));
71
73
  },
@@ -226,8 +226,7 @@ export function isAccountAndWalletMatched(
226
226
  ) {
227
227
  return (
228
228
  account.address === connectedWallet.address &&
229
- account.chain === connectedWallet.chain &&
230
- account.walletType === connectedWallet.walletType
229
+ account.chain === connectedWallet.chain
231
230
  );
232
231
  }
233
232