@metamask/connect-multichain 0.11.0 → 0.11.1
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/CHANGELOG.md +14 -1
- package/LICENSE +18 -20
- package/dist/browser/es/connect-multichain.mjs +7 -12
- package/dist/browser/es/connect-multichain.mjs.map +1 -1
- package/dist/browser/es/metafile-esm.json +1 -1
- package/dist/browser/iife/connect-multichain.js +7 -12
- package/dist/browser/iife/connect-multichain.js.map +1 -1
- package/dist/browser/iife/metafile-iife.json +1 -1
- package/dist/browser/umd/connect-multichain.js +7 -12
- package/dist/browser/umd/connect-multichain.js.map +1 -1
- package/dist/browser/umd/metafile-cjs.json +1 -1
- package/dist/node/cjs/connect-multichain.js +7 -12
- package/dist/node/cjs/connect-multichain.js.map +1 -1
- package/dist/node/cjs/metafile-cjs.json +1 -1
- package/dist/node/es/connect-multichain.mjs +7 -12
- package/dist/node/es/connect-multichain.mjs.map +1 -1
- package/dist/node/es/metafile-esm.json +1 -1
- package/dist/react-native/es/connect-multichain.mjs +7 -12
- package/dist/react-native/es/connect-multichain.mjs.map +1 -1
- package/dist/react-native/es/metafile-esm.json +1 -1
- package/dist/src/domain/platform/index.js +9 -10
- package/dist/src/domain/platform/index.js.map +1 -1
- package/dist/src/multichain/transports/mwp/index.d.ts +1 -0
- package/dist/src/multichain/transports/mwp/index.d.ts.map +1 -1
- package/dist/src/multichain/transports/mwp/index.js +1 -1
- package/dist/src/multichain/transports/mwp/index.js.map +1 -1
- package/package.json +5 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.11.1]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- chore: align sub-package licenses with root ConsenSys 2022 license ([#241](https://github.com/MetaMask/connect-monorepo/pull/241))
|
|
15
|
+
- chore: turborepo ([#239](https://github.com/MetaMask/connect-monorepo/pull/239))
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- `MWPTransport.connect()` now accepts and forwards a `forceRequest` option. When `true`, `onResumeSuccess` skips the `isSameScopesAndAccounts` check and unconditionally sends `wallet_createSession`, allowing consumers to re-prompt account selection on an existing MWP session. Previously `forceRequest` was silently ignored, causing `wallet_requestPermissions` to no-op on mobile. ([#243](https://github.com/MetaMask/connect-monorepo/pull/243))
|
|
20
|
+
- Fix platform detection for Hermes-based React Native apps: `isReactNative()` now checks `global.navigator.product` before `window.navigator.product`, so modern RN environments where `window` is undefined correctly resolve to `PlatformType.ReactNative` instead of `PlatformType.NonBrowser`. This restores analytics for all React Native consumers — analytics were silently disabled because `#setupAnalytics()` only calls `analytics.enable()` for browser and `ReactNative` platforms ([#238](https://github.com/MetaMask/connect-monorepo/pull/238))
|
|
21
|
+
|
|
10
22
|
## [0.11.0]
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -227,7 +239,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
227
239
|
|
|
228
240
|
- Initial release
|
|
229
241
|
|
|
230
|
-
[Unreleased]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.11.
|
|
242
|
+
[Unreleased]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.11.1...HEAD
|
|
243
|
+
[0.11.1]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.11.0...@metamask/connect-multichain@0.11.1
|
|
231
244
|
[0.11.0]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.10.0...@metamask/connect-multichain@0.11.0
|
|
232
245
|
[0.10.0]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.9.0...@metamask/connect-multichain@0.10.0
|
|
233
246
|
[0.9.0]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.8.0...@metamask/connect-multichain@0.9.0
|
package/LICENSE
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
Copyright ConsenSys Software Inc. 2022. All rights reserved.
|
|
2
|
+
|
|
3
|
+
You acknowledge and agree that ConsenSys Software Inc. ("ConsenSys") (or ConsenSys's licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the "Program"), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form.
|
|
4
|
+
|
|
5
|
+
Subject to the limited license below, you may not (and you may not permit anyone else to) distribute, publish, copy, modify, merge, combine with another program, create derivative works of, reverse engineer, decompile or otherwise attempt to extract the source code of, the Program or any part thereof, except that you may contribute to this repository.
|
|
6
|
+
|
|
7
|
+
You are granted a non-exclusive, non-transferable, non-sublicensable license to distribute, publish, copy, modify, merge, combine with another program or create derivative works of the Program (such resulting program, collectively, the "Resulting Program") solely for Non-Commercial Use as long as you:
|
|
8
|
+
1. give prominent notice ("Notice") with each copy of the Resulting Program that the Program is used in the Resulting Program and that the Program is the copyright of ConsenSys; and
|
|
9
|
+
2. subject the Resulting Program and any distribution, publication, copy, modification, merger therewith, combination with another program or derivative works thereof to the same Notice requirement and Non-Commercial Use restriction set forth herein.
|
|
10
|
+
|
|
11
|
+
"Non-Commercial Use" means each use as described in clauses (1)-(3) below, as reasonably determined by ConsenSys in its sole discretion:
|
|
12
|
+
1. personal use for research, personal study, private entertainment, hobby projects or amateur pursuits, in each case without any anticipated commercial application;
|
|
13
|
+
2. use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization or government institution; or
|
|
14
|
+
3. the number of monthly active users of the Resulting Program across all versions thereof and platforms globally do not exceed 10,000 at any time.
|
|
15
|
+
|
|
16
|
+
You will not use any trade mark, service mark, trade name, logo of ConsenSys or any other company or organization in a way that is likely or intended to cause confusion about the owner or authorized user of such marks, names or logos.
|
|
17
|
+
|
|
18
|
+
If you have any questions, comments or interest in pursuing any other use cases, please reach out to us at metamask.license@consensys.net.
|
|
@@ -506,26 +506,21 @@ var init_multichain = __esm({
|
|
|
506
506
|
// src/domain/platform/index.ts
|
|
507
507
|
import Bowser from "bowser";
|
|
508
508
|
function isNotBrowser() {
|
|
509
|
-
var _a3;
|
|
510
509
|
if (typeof window === "undefined") {
|
|
511
510
|
return true;
|
|
512
511
|
}
|
|
513
512
|
if (!(window == null ? void 0 : window.navigator)) {
|
|
514
513
|
return true;
|
|
515
514
|
}
|
|
516
|
-
if (typeof global !== "undefined" && ((_a3 = global == null ? void 0 : global.navigator) == null ? void 0 : _a3.product) === "ReactNative") {
|
|
517
|
-
return true;
|
|
518
|
-
}
|
|
519
515
|
return (navigator == null ? void 0 : navigator.product) === "ReactNative";
|
|
520
516
|
}
|
|
521
517
|
function isReactNative() {
|
|
522
|
-
var _a3;
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
if (!nav) {
|
|
526
|
-
return false;
|
|
518
|
+
var _a3, _b;
|
|
519
|
+
if (typeof global !== "undefined" && ((_a3 = global == null ? void 0 : global.navigator) == null ? void 0 : _a3.product) === "ReactNative") {
|
|
520
|
+
return true;
|
|
527
521
|
}
|
|
528
|
-
|
|
522
|
+
const hasWindowNavigator = typeof window !== "undefined" && window.navigator !== void 0;
|
|
523
|
+
return hasWindowNavigator && ((_b = window.navigator) == null ? void 0 : _b.product) === "ReactNative";
|
|
529
524
|
}
|
|
530
525
|
function isMetaMaskMobileWebView() {
|
|
531
526
|
return typeof window !== "undefined" && // @ts-expect-error ReactNativeWebView should be defined
|
|
@@ -2262,7 +2257,7 @@ var MWPTransport = class {
|
|
|
2262
2257
|
walletSession,
|
|
2263
2258
|
proposedCaipAccountIds
|
|
2264
2259
|
);
|
|
2265
|
-
if (!hasSameScopesAndAccounts) {
|
|
2260
|
+
if (options.forceRequest || !hasSameScopesAndAccounts) {
|
|
2266
2261
|
const optionalScopes = addValidAccounts(
|
|
2267
2262
|
getOptionalScopes((_d = options == null ? void 0 : options.scopes) != null ? _d : []),
|
|
2268
2263
|
getValidAccounts((_e = options == null ? void 0 : options.caipAccountIds) != null ? _e : [])
|
|
@@ -2763,7 +2758,7 @@ var _MetaMaskConnectMultichain = class _MetaMaskConnectMultichain extends Multic
|
|
|
2763
2758
|
versions: __spreadValues({
|
|
2764
2759
|
// typeof guard needed: Metro (React Native) bundles TS source directly,
|
|
2765
2760
|
// bypassing the tsup build that substitutes __PACKAGE_VERSION__.
|
|
2766
|
-
"connect-multichain": false ? "unknown" : "0.11.
|
|
2761
|
+
"connect-multichain": false ? "unknown" : "0.11.1"
|
|
2767
2762
|
}, (_f = options.versions) != null ? _f : {})
|
|
2768
2763
|
});
|
|
2769
2764
|
super(allOptions);
|