@dynamic-labs/starknet 0.18.10 → 0.18.12
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
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.18.12](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.11...v0.18.12) (2023-08-30)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add deepLinkPreference prop ([#3174](https://github.com/dynamic-labs/DynamicAuth/issues/3174)) ([#3176](https://github.com/dynamic-labs/DynamicAuth/issues/3176)) ([8a6e389](https://github.com/dynamic-labs/DynamicAuth/commit/8a6e389e84bd74e80dc9df37ba6df5d46e6ba831))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* end connector session when unlinking from bridge ([#3120](https://github.com/dynamic-labs/DynamicAuth/issues/3120)) ([#3178](https://github.com/dynamic-labs/DynamicAuth/issues/3178)) ([0a69e21](https://github.com/dynamic-labs/DynamicAuth/commit/0a69e218dc9a9a0709bb74b901ed0ca08c7f463c))
|
|
13
|
+
* **bridge:** update address when switching networks ([#3171](https://github.com/dynamic-labs/DynamicAuth/issues/3171)) ([#3180](https://github.com/dynamic-labs/DynamicAuth/issues/3180)) ([8ab5ce4](https://github.com/dynamic-labs/DynamicAuth/commit/8ab5ce4add675ae326c052fc1510d54d56d0d665))
|
|
14
|
+
|
|
15
|
+
### [0.18.11](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.10...v0.18.11) (2023-08-29)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **bridge:** connect L2 wallet after updating network ([#3162](https://github.com/dynamic-labs/DynamicAuth/issues/3162)) ([6a90668](https://github.com/dynamic-labs/DynamicAuth/commit/6a906687d793fdfa03df87895f9c44b7a5e099dc))
|
|
21
|
+
* resend magic OTP on back click ([#3123](https://github.com/dynamic-labs/DynamicAuth/issues/3123)) ([#3150](https://github.com/dynamic-labs/DynamicAuth/issues/3150)) ([bcba905](https://github.com/dynamic-labs/DynamicAuth/commit/bcba905f22e796c122bb3bb156ec0e0f2a8fb3c6))
|
|
22
|
+
* **WagmiConnector:** sync wagmi with wallet connector events ([#3161](https://github.com/dynamic-labs/DynamicAuth/issues/3161)) ([7cd1da1](https://github.com/dynamic-labs/DynamicAuth/commit/7cd1da173ff7fca50cf2e92e0fad4dfbe651717c)), closes [#3149](https://github.com/dynamic-labs/DynamicAuth/issues/3149)
|
|
23
|
+
|
|
2
24
|
### [0.18.10](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.9...v0.18.10) (2023-08-25)
|
|
3
25
|
|
|
4
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/starknet",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.12",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"get-starknet-core": "3.0.1",
|
|
31
31
|
"text-encoding": "0.7.0",
|
|
32
32
|
"@dynamic-labs/sdk-api": "0.0.270",
|
|
33
|
-
"@dynamic-labs/utils": "0.18.
|
|
34
|
-
"@dynamic-labs/wallet-book": "0.18.
|
|
35
|
-
"@dynamic-labs/wallet-connector-core": "0.18.
|
|
33
|
+
"@dynamic-labs/utils": "0.18.12",
|
|
34
|
+
"@dynamic-labs/wallet-book": "0.18.12",
|
|
35
|
+
"@dynamic-labs/wallet-connector-core": "0.18.12"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {}
|
|
38
38
|
}
|
|
@@ -149,10 +149,16 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
149
149
|
return (starknetWindowInstance === null || starknetWindowInstance === void 0 ? void 0 : starknetWindowInstance.name) === this.name;
|
|
150
150
|
}
|
|
151
151
|
getConnectedAccounts() {
|
|
152
|
-
var _a;
|
|
153
152
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
154
153
|
const wallet = yield this.getWallet();
|
|
155
|
-
|
|
154
|
+
if (!wallet) {
|
|
155
|
+
return [];
|
|
156
|
+
}
|
|
157
|
+
const needsReconnection = !wallet.isConnected && (yield wallet.isPreauthorized());
|
|
158
|
+
if (needsReconnection) {
|
|
159
|
+
yield this.connect();
|
|
160
|
+
}
|
|
161
|
+
return wallet.selectedAddress ? [wallet.selectedAddress] : [];
|
|
156
162
|
});
|
|
157
163
|
}
|
|
158
164
|
setupEventListeners(listeners) {
|
|
@@ -147,10 +147,16 @@ class StarknetWalletConnector extends WalletConnectorBase {
|
|
|
147
147
|
return (starknetWindowInstance === null || starknetWindowInstance === void 0 ? void 0 : starknetWindowInstance.name) === this.name;
|
|
148
148
|
}
|
|
149
149
|
getConnectedAccounts() {
|
|
150
|
-
var _a;
|
|
151
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
152
151
|
const wallet = yield this.getWallet();
|
|
153
|
-
|
|
152
|
+
if (!wallet) {
|
|
153
|
+
return [];
|
|
154
|
+
}
|
|
155
|
+
const needsReconnection = !wallet.isConnected && (yield wallet.isPreauthorized());
|
|
156
|
+
if (needsReconnection) {
|
|
157
|
+
yield this.connect();
|
|
158
|
+
}
|
|
159
|
+
return wallet.selectedAddress ? [wallet.selectedAddress] : [];
|
|
154
160
|
});
|
|
155
161
|
}
|
|
156
162
|
setupEventListeners(listeners) {
|