@rango-dev/wallets-react 0.30.2-next.0 → 0.30.2-next.10
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/helpers/index.js +1 -1
- package/dist/helpers/index.js.map +3 -3
- package/dist/hub/helpers.d.ts +8 -0
- package/dist/hub/helpers.d.ts.map +1 -1
- package/dist/hub/lastConnectedWallets.d.ts.map +1 -1
- package/dist/hub/useHubAdapter.d.ts +2 -1
- package/dist/hub/useHubAdapter.d.ts.map +1 -1
- package/dist/hub/useHubRefs.d.ts.map +1 -1
- package/dist/hub/utils.d.ts +8 -3
- package/dist/hub/utils.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/legacy/types.d.ts +6 -2
- package/dist/legacy/types.d.ts.map +1 -1
- package/dist/legacy/useLegacyProviders.d.ts.map +1 -1
- package/dist/wallets-react.build.json +1 -1
- package/package.json +3 -3
- package/src/hub/helpers.ts +56 -0
- package/src/hub/lastConnectedWallets.ts +24 -5
- package/src/hub/useHubAdapter.ts +60 -32
- package/src/hub/useHubRefs.ts +4 -7
- package/src/hub/utils.ts +33 -28
- package/src/legacy/context.ts +10 -10
- package/src/legacy/types.ts +6 -2
- package/src/legacy/useLegacyProviders.ts +5 -2
- package/src/useProviders.ts +5 -5
package/src/useProviders.ts
CHANGED
|
@@ -42,18 +42,18 @@ function useProviders(props: ProviderProps) {
|
|
|
42
42
|
}
|
|
43
43
|
return legacyApi.canSwitchNetworkTo(type, network);
|
|
44
44
|
},
|
|
45
|
-
async connect(type,
|
|
45
|
+
async connect(type, namespaces): Promise<ConnectResult[]> {
|
|
46
46
|
const hubProvider = findProviderByType(hubProviders, type);
|
|
47
47
|
if (hubProvider) {
|
|
48
|
-
return await hubApi.connect(type,
|
|
48
|
+
return await hubApi.connect(type, namespaces);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
return await legacyApi.connect(type,
|
|
51
|
+
return await legacyApi.connect(type, namespaces);
|
|
52
52
|
},
|
|
53
|
-
async disconnect(type): Promise<void> {
|
|
53
|
+
async disconnect(type, namespaces): Promise<void> {
|
|
54
54
|
const hubProvider = findProviderByType(hubProviders, type);
|
|
55
55
|
if (hubProvider) {
|
|
56
|
-
return await hubApi.disconnect(type);
|
|
56
|
+
return await hubApi.disconnect(type, namespaces);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
return await legacyApi.disconnect(type);
|