@aptos-labs/wallet-adapter-core 3.3.0 → 3.4.0
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 +6 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/WalletCore.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -435,14 +435,14 @@ var WalletCore = class extends import_eventemitter32.default {
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
async connect(walletName) {
|
|
438
|
-
var _a;
|
|
438
|
+
var _a, _b;
|
|
439
439
|
const selectedWallet = (_a = this._wallets) == null ? void 0 : _a.find(
|
|
440
440
|
(wallet) => wallet.name === walletName
|
|
441
441
|
);
|
|
442
442
|
if (!selectedWallet)
|
|
443
443
|
return;
|
|
444
444
|
if (this._connected) {
|
|
445
|
-
if (
|
|
445
|
+
if (((_b = this._wallet) == null ? void 0 : _b.name) === walletName)
|
|
446
446
|
throw new WalletConnectionError(
|
|
447
447
|
`${walletName} wallet is already connected`
|
|
448
448
|
).message;
|
package/dist/index.mjs
CHANGED
|
@@ -401,14 +401,14 @@ var WalletCore = class extends EventEmitter2 {
|
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
async connect(walletName) {
|
|
404
|
-
var _a;
|
|
404
|
+
var _a, _b;
|
|
405
405
|
const selectedWallet = (_a = this._wallets) == null ? void 0 : _a.find(
|
|
406
406
|
(wallet) => wallet.name === walletName
|
|
407
407
|
);
|
|
408
408
|
if (!selectedWallet)
|
|
409
409
|
return;
|
|
410
410
|
if (this._connected) {
|
|
411
|
-
if (
|
|
411
|
+
if (((_b = this._wallet) == null ? void 0 : _b.name) === walletName)
|
|
412
412
|
throw new WalletConnectionError(
|
|
413
413
|
`${walletName} wallet is already connected`
|
|
414
414
|
).message;
|
package/package.json
CHANGED
package/src/WalletCore.ts
CHANGED
|
@@ -207,7 +207,7 @@ export class WalletCore extends EventEmitter<WalletCoreEvents> {
|
|
|
207
207
|
|
|
208
208
|
if (this._connected) {
|
|
209
209
|
// if the selected wallet is already connected, we don't need to connect again
|
|
210
|
-
if (
|
|
210
|
+
if (this._wallet?.name === walletName)
|
|
211
211
|
throw new WalletConnectionError(
|
|
212
212
|
`${walletName} wallet is already connected`
|
|
213
213
|
).message;
|