@meshconnect/uwc-react 0.15.20-snapshot.c393760 → 0.15.21
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UniversalWalletConnector, type UWCObserver } from '@meshconnect/uwc-core';
|
|
3
|
-
import type { Session, Network, WalletMetadata, WalletConnectConfig, TonConnectConfig, TronConnectorConfig, Logger, LogLevel
|
|
3
|
+
import type { Session, Network, WalletMetadata, WalletConnectConfig, TonConnectConfig, TronConnectorConfig, Logger, LogLevel } from '@meshconnect/uwc-types';
|
|
4
4
|
export interface ConnectionContextValue {
|
|
5
5
|
/**
|
|
6
6
|
* `null` when the provider is mounted without wallets. `@meshconnect/uwc-core`
|
|
@@ -43,13 +43,7 @@ interface ConnectionProviderProps {
|
|
|
43
43
|
* connector construction, like the observability props above.
|
|
44
44
|
*/
|
|
45
45
|
secondaryGatherTimeoutMs?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Namespace preference for a connect that names no network (injected mode,
|
|
48
|
-
* detected namespaces only). See `UWCConfig.preferredNamespaces`. Read once at
|
|
49
|
-
* connector construction.
|
|
50
|
-
*/
|
|
51
|
-
preferredNamespaces?: readonly Namespace[];
|
|
52
46
|
}
|
|
53
|
-
export declare function ConnectionProvider({ children, networks, wallets, usingIntegratedBrowser, walletConnectConfig, tonConnectConfig, tronConnectorConfig, observer, logger, logLevel, correlationId, secondaryGatherTimeoutMs
|
|
47
|
+
export declare function ConnectionProvider({ children, networks, wallets, usingIntegratedBrowser, walletConnectConfig, tonConnectConfig, tronConnectorConfig, observer, logger, logLevel, correlationId, secondaryGatherTimeoutMs }: ConnectionProviderProps): React.ReactElement;
|
|
54
48
|
export { ConnectionContext };
|
|
55
49
|
//# sourceMappingURL=ConnectionProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ConnectionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAA;AACjE,OAAO,EACL,wBAAwB,EAExB,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,MAAM,EACN,QAAQ,
|
|
1
|
+
{"version":3,"file":"ConnectionProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ConnectionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAA;AACjE,OAAO,EACL,wBAAwB,EAExB,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACT,MAAM,wBAAwB,CAAA;AAkC/B,MAAM,WAAW,sBAAsB;IACrC;;;;;;;OAOG;IACH,SAAS,EAAE,wBAAwB,GAAG,IAAI,CAAA;IAC1C,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,QAAA,MAAM,iBAAiB,8CAAqD,CAAA;AAE5E,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;IACzC,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;IACzC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAA;IACvC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,sBAA8B,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,aAAa,EACb,wBAAwB,EACzB,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,CAsF9C;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -27,7 +27,7 @@ const EMPTY_SESSION = {
|
|
|
27
27
|
availableAddresses: []
|
|
28
28
|
};
|
|
29
29
|
const ConnectionContext = createContext(null);
|
|
30
|
-
export function ConnectionProvider({ children, networks, wallets, usingIntegratedBrowser = false, walletConnectConfig, tonConnectConfig, tronConnectorConfig, observer, logger, logLevel, correlationId, secondaryGatherTimeoutMs
|
|
30
|
+
export function ConnectionProvider({ children, networks, wallets, usingIntegratedBrowser = false, walletConnectConfig, tonConnectConfig, tronConnectorConfig, observer, logger, logLevel, correlationId, secondaryGatherTimeoutMs }) {
|
|
31
31
|
// Core rejects an empty wallet list, so only construct once there is at least
|
|
32
32
|
// one wallet. A wallet-less session keeps `connector` null; the effect below
|
|
33
33
|
// adopts the connector if wallets arrive later (async catalog population).
|
|
@@ -53,8 +53,6 @@ export function ConnectionProvider({ children, networks, wallets, usingIntegrate
|
|
|
53
53
|
// bound" value and would be dropped by a truthy check.
|
|
54
54
|
if (secondaryGatherTimeoutMs !== undefined)
|
|
55
55
|
config.secondaryGatherTimeoutMs = secondaryGatherTimeoutMs;
|
|
56
|
-
if (preferredNamespaces !== undefined)
|
|
57
|
-
config.preferredNamespaces = preferredNamespaces;
|
|
58
56
|
sharedConnector = new UniversalWalletConnector(config);
|
|
59
57
|
capturedObservability = {
|
|
60
58
|
hadObserver: !!observer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionProvider.js","sourceRoot":"","sources":["../../src/providers/ConnectionProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EACL,wBAAwB,EAGzB,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"ConnectionProvider.js","sourceRoot":"","sources":["../../src/providers/ConnectionProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EACL,wBAAwB,EAGzB,MAAM,uBAAuB,CAAA;AAY9B,sCAAsC;AACtC,IAAI,eAAe,GAAoC,IAAI,CAAA;AAC3D,yEAAyE;AACzE,4EAA4E;AAC5E,gEAAgE;AAChE,IAAI,qBAAqB,GAKd,IAAI,CAAA;AACf,IAAI,uBAAuB,GAAG,KAAK,CAAA;AAEnC;;;;;;GAMG;AACH,MAAM,aAAa,GAAY;IAC7B,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,IAAI;IACnB,wBAAwB,EAAE,IAAI;IAC9B,+BAA+B,EAAE,IAAI;IACrC,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,IAAI;IACf,iBAAiB,EAAE,EAAE;IACrB,YAAY,EAAE,IAAI;IAClB,kBAAkB,EAAE,EAAE;CACvB,CAAA;AAkBD,MAAM,iBAAiB,GAAG,aAAa,CAAgC,IAAI,CAAC,CAAA;AA8B5E,MAAM,UAAU,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,sBAAsB,GAAG,KAAK,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EAC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C,UAAU,EAAE,CAAC,CAAA;QAClC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;QAE/B,MAAM,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE;YAC3C,UAAU,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAA;YAClC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;QACjC,CAAC,CAAC,CAAA;QAEF,OAAO,WAAW,CAAA;IACpB,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAEf,MAAM,KAAK,GAA2B;QACpC,SAAS;QACT,OAAO;QACP,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,OAAO;QACrD,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,QAAQ;QACxD,OAAO;KACR,CAAA;IAED,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACrC,QAAQ,GACkB,CAC9B,CAAA;AACH,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshconnect/uwc-react",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.21",
|
|
4
4
|
"description": "React hooks and components for Universal Wallet Connector",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"src"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@meshconnect/uwc-core": "2.7.
|
|
20
|
-
"@meshconnect/uwc-types": "0.33.
|
|
19
|
+
"@meshconnect/uwc-core": "2.7.3",
|
|
20
|
+
"@meshconnect/uwc-types": "0.33.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": "^18.3.0 || ^19.0.0"
|
|
@@ -12,8 +12,7 @@ import type {
|
|
|
12
12
|
TonConnectConfig,
|
|
13
13
|
TronConnectorConfig,
|
|
14
14
|
Logger,
|
|
15
|
-
LogLevel
|
|
16
|
-
Namespace
|
|
15
|
+
LogLevel
|
|
17
16
|
} from '@meshconnect/uwc-types'
|
|
18
17
|
|
|
19
18
|
// Guard against double initialization
|
|
@@ -92,12 +91,6 @@ interface ConnectionProviderProps {
|
|
|
92
91
|
* connector construction, like the observability props above.
|
|
93
92
|
*/
|
|
94
93
|
secondaryGatherTimeoutMs?: number
|
|
95
|
-
/**
|
|
96
|
-
* Namespace preference for a connect that names no network (injected mode,
|
|
97
|
-
* detected namespaces only). See `UWCConfig.preferredNamespaces`. Read once at
|
|
98
|
-
* connector construction.
|
|
99
|
-
*/
|
|
100
|
-
preferredNamespaces?: readonly Namespace[]
|
|
101
94
|
}
|
|
102
95
|
|
|
103
96
|
export function ConnectionProvider({
|
|
@@ -112,8 +105,7 @@ export function ConnectionProvider({
|
|
|
112
105
|
logger,
|
|
113
106
|
logLevel,
|
|
114
107
|
correlationId,
|
|
115
|
-
secondaryGatherTimeoutMs
|
|
116
|
-
preferredNamespaces
|
|
108
|
+
secondaryGatherTimeoutMs
|
|
117
109
|
}: ConnectionProviderProps): React.ReactElement {
|
|
118
110
|
// Core rejects an empty wallet list, so only construct once there is at least
|
|
119
111
|
// one wallet. A wallet-less session keeps `connector` null; the effect below
|
|
@@ -133,8 +125,6 @@ export function ConnectionProvider({
|
|
|
133
125
|
// bound" value and would be dropped by a truthy check.
|
|
134
126
|
if (secondaryGatherTimeoutMs !== undefined)
|
|
135
127
|
config.secondaryGatherTimeoutMs = secondaryGatherTimeoutMs
|
|
136
|
-
if (preferredNamespaces !== undefined)
|
|
137
|
-
config.preferredNamespaces = preferredNamespaces
|
|
138
128
|
sharedConnector = new UniversalWalletConnector(config)
|
|
139
129
|
capturedObservability = {
|
|
140
130
|
hadObserver: !!observer,
|