@rango-dev/widget-embedded 0.32.2-next.1 → 0.32.2-next.3

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.32.2-next.1",
3
+ "version": "0.32.2-next.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -25,7 +25,7 @@
25
25
  "@lingui/core": "4.2.1",
26
26
  "@lingui/react": "4.2.1",
27
27
  "@rango-dev/logging-core": "^0.6.0",
28
- "@rango-dev/provider-all": "^0.36.1-next.5",
28
+ "@rango-dev/provider-all": "^0.36.1-next.6",
29
29
  "@rango-dev/queue-manager-core": "^0.27.0",
30
30
  "@rango-dev/queue-manager-rango-preset": "^0.36.1-next.1",
31
31
  "@rango-dev/queue-manager-react": "^0.27.0",
@@ -54,4 +54,4 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  }
57
- }
57
+ }
@@ -1 +1,2 @@
1
1
  export { StatefulConnectModal } from './StatefulConnectModal';
2
+ export { isOnNamespace, isOnDerivationPath } from './helpers';
@@ -34,11 +34,14 @@ export function reducer(state: State, action: Actions): State {
34
34
  case 'reset':
35
35
  return initState;
36
36
  case 'resetDerivation':
37
- return {
38
- ...state,
39
- derivationPath: null,
40
- status: 'namespace',
41
- };
37
+ if (state.namespace) {
38
+ return {
39
+ ...state,
40
+ derivationPath: null,
41
+ status: 'namespace',
42
+ };
43
+ }
44
+ return initState;
42
45
  default:
43
46
  throw new Error(`Action hasn't been defined.`);
44
47
  }
package/src/index.ts CHANGED
@@ -57,6 +57,11 @@ import { useWallets, Events as WalletEvents } from '@rango-dev/wallets-react';
57
57
  import { Networks, WalletTypes } from '@rango-dev/wallets-shared';
58
58
  import { PendingSwapNetworkStatus } from 'rango-types';
59
59
 
60
+ import {
61
+ isOnDerivationPath,
62
+ isOnNamespace,
63
+ } from './components/StatefulConnectModal';
64
+ import { DerivationPath, Namespaces } from './components/WalletStatefulConnect';
60
65
  import { WIDGET_UI_ID as UI_ID } from './constants';
61
66
  import { SUPPORTED_FONTS } from './constants/fonts';
62
67
  import { WidgetWallets } from './containers/Wallets';
@@ -76,6 +81,13 @@ import {
76
81
  } from './types';
77
82
  import { customizedThemeTokens } from './utils/ui';
78
83
 
84
+ export const StatefulConnect = {
85
+ DerivationPath,
86
+ Namespaces,
87
+ isOnDerivationPath,
88
+ isOnNamespace,
89
+ };
90
+
79
91
  export type {
80
92
  WidgetConfig,
81
93
  WalletType,