Skip to content

Commit 32f3054

Browse files
adonesky1jiexi
andauthored
Remove dangling branching logic where old sdk deeplink routes can be generated (#57)
* remove dangling branching logic where old sdk deeplink routes can be generated * changelog * add context to changelog entry --------- Co-authored-by: Jiexi Luan <jiexiluan@gmail.com>
1 parent 95ac365 commit 32f3054

4 files changed

Lines changed: 6 additions & 11 deletions

File tree

packages/connect-evm/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- Typedoc generation ([#31](https://github.com/MetaMask/connect-monorepo/pull/31))
1919
- Permissioning accounts through `wallet_requestPermissions` ([#31](https://github.com/MetaMask/connect-monorepo/pull/31))
2020
- Enable conditional logging through options in `createMetamaskConnectEVM` ([#31](https://github.com/MetaMask/connect-monorepo/pull/31))
21+
- Fixed mobile deeplink bug that occurred when `MetamaskConnectEVM.connect()` was called and the transport was already connected ([#57](https://github.com/MetaMask/connect-monorepo/pull/57))
2122

2223
[Unreleased]: https://github.com/MetaMask/metamask-connect-monorepo/

packages/connect-multichain/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Fixed mobile deeplink bug that occurred when `MultichainSDK.connect()` was called and the transport was already connected ([#57](https://github.com/MetaMask/connect-monorepo/pull/57))
13+
1014
## [0.2.1]
1115

1216
### Added

packages/connect-multichain/src/multichain/index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -496,16 +496,6 @@ export class MultichainSDK extends MultichainCore {
496496
}
497497
},
498498
);
499-
} else {
500-
timeout = setTimeout(() => {
501-
const deeplink = this.options.ui.factory.createDeeplink();
502-
const universalLink = this.options.ui.factory.createUniversalLink();
503-
if (this.options.mobile?.preferredOpenLink) {
504-
this.options.mobile.preferredOpenLink(deeplink, '_self');
505-
} else {
506-
openDeeplink(this.options, deeplink, universalLink);
507-
}
508-
}, 250);
509499
}
510500

511501
this.transport

packages/connect-multichain/src/ui/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export class ModalFactory<T extends FactoryModals = FactoryModals> {
147147

148148
createDeeplink(connectionRequest?: ConnectionRequest) {
149149
if (!connectionRequest) {
150-
return `${METAMASK_DEEPLINK_BASE}`;
150+
throw new Error('createDeeplink can only be called with a connection request');
151151
}
152152
const json = JSON.stringify(connectionRequest);
153153
const compressed = compressString(json);

0 commit comments

Comments
 (0)