@bit-buccaneers/wallet-abstraction 0.0.11 → 0.0.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/dist/dev.js +2 -2
- package/dist/dev.jsx +2 -2
- package/dist/index.js +8 -1
- package/dist/index.jsx +8 -1
- package/package.json +1 -1
package/dist/dev.js
CHANGED
|
@@ -1330,8 +1330,8 @@ var getSolanaWallets = () => {
|
|
|
1330
1330
|
const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).filter((w) => {
|
|
1331
1331
|
return w.constructor.name !== "SolflareMetaMaskWallet";
|
|
1332
1332
|
}).map(createSolanaConnector);
|
|
1333
|
-
console.log({ wallets });
|
|
1334
|
-
console.log({ connectors });
|
|
1333
|
+
console.log("wallets", { wallets });
|
|
1334
|
+
console.log("connectors", { connectors });
|
|
1335
1335
|
addFallbackConnectors(connectors, SOLANA_FALLBACK_CONNECTORS);
|
|
1336
1336
|
return connectors;
|
|
1337
1337
|
};
|
package/dist/dev.jsx
CHANGED
|
@@ -1367,8 +1367,8 @@ var getSolanaWallets = () => {
|
|
|
1367
1367
|
const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).filter((w) => {
|
|
1368
1368
|
return w.constructor.name !== "SolflareMetaMaskWallet";
|
|
1369
1369
|
}).map(createSolanaConnector);
|
|
1370
|
-
console.log({ wallets });
|
|
1371
|
-
console.log({ connectors });
|
|
1370
|
+
console.log("wallets", { wallets });
|
|
1371
|
+
console.log("connectors", { connectors });
|
|
1372
1372
|
addFallbackConnectors(connectors, SOLANA_FALLBACK_CONNECTORS);
|
|
1373
1373
|
return connectors;
|
|
1374
1374
|
};
|
package/dist/index.js
CHANGED
|
@@ -514,6 +514,7 @@ var connectWalletConnect = async (options) => {
|
|
|
514
514
|
try {
|
|
515
515
|
await signClient.core.pairing.disconnect({ topic: pairing.topic });
|
|
516
516
|
} catch {
|
|
517
|
+
console.log("Failed to disconnect pairing", pairing);
|
|
517
518
|
}
|
|
518
519
|
}
|
|
519
520
|
}
|
|
@@ -552,10 +553,12 @@ var requestWalletConnect = async (method, params, chainId) => {
|
|
|
552
553
|
try {
|
|
553
554
|
await signClient.ping({ topic: currentSession.topic });
|
|
554
555
|
} catch (e) {
|
|
556
|
+
console.error("WalletConnect session ping failed:", e);
|
|
555
557
|
currentSession = null;
|
|
556
558
|
notifySessionChange(null);
|
|
557
559
|
throw new Error("WalletConnect session expired. Please reconnect.");
|
|
558
560
|
}
|
|
561
|
+
console.log("WC request:", { method, params, chainId, topic: currentSession.topic });
|
|
559
562
|
try {
|
|
560
563
|
const result = await signClient.request({
|
|
561
564
|
topic: currentSession.topic,
|
|
@@ -565,8 +568,10 @@ var requestWalletConnect = async (method, params, chainId) => {
|
|
|
565
568
|
params
|
|
566
569
|
}
|
|
567
570
|
});
|
|
571
|
+
console.log("WC response:", result);
|
|
568
572
|
return result;
|
|
569
573
|
} catch (e) {
|
|
574
|
+
console.error("WC request failed:", e);
|
|
570
575
|
throw e;
|
|
571
576
|
}
|
|
572
577
|
};
|
|
@@ -1325,6 +1330,8 @@ var getSolanaWallets = () => {
|
|
|
1325
1330
|
const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).filter((w) => {
|
|
1326
1331
|
return w.constructor.name !== "SolflareMetaMaskWallet";
|
|
1327
1332
|
}).map(createSolanaConnector);
|
|
1333
|
+
console.log("wallets", { wallets });
|
|
1334
|
+
console.log("connectors", { connectors });
|
|
1328
1335
|
addFallbackConnectors(connectors, SOLANA_FALLBACK_CONNECTORS);
|
|
1329
1336
|
return connectors;
|
|
1330
1337
|
};
|
|
@@ -1594,7 +1601,7 @@ var useWalletConnect = (options) => {
|
|
|
1594
1601
|
options.onEvmConnection(getEvmAccountFromSession(session.namespaces));
|
|
1595
1602
|
}
|
|
1596
1603
|
if (session.namespaces.solana?.accounts?.[0] && options.onSolanaConnection) {
|
|
1597
|
-
getSolanaAccountFromSession(session.namespaces).then(options.onSolanaConnection).catch((err) =>
|
|
1604
|
+
getSolanaAccountFromSession(session.namespaces).then(options.onSolanaConnection).catch((err) => console.error("Solana session parse error:", err));
|
|
1598
1605
|
}
|
|
1599
1606
|
};
|
|
1600
1607
|
const existingSession = getCurrentSession();
|
package/dist/index.jsx
CHANGED
|
@@ -524,6 +524,7 @@ var connectWalletConnect = async (options) => {
|
|
|
524
524
|
try {
|
|
525
525
|
await signClient.core.pairing.disconnect({ topic: pairing.topic });
|
|
526
526
|
} catch {
|
|
527
|
+
console.log("Failed to disconnect pairing", pairing);
|
|
527
528
|
}
|
|
528
529
|
}
|
|
529
530
|
}
|
|
@@ -562,10 +563,12 @@ var requestWalletConnect = async (method, params, chainId) => {
|
|
|
562
563
|
try {
|
|
563
564
|
await signClient.ping({ topic: currentSession.topic });
|
|
564
565
|
} catch (e) {
|
|
566
|
+
console.error("WalletConnect session ping failed:", e);
|
|
565
567
|
currentSession = null;
|
|
566
568
|
notifySessionChange(null);
|
|
567
569
|
throw new Error("WalletConnect session expired. Please reconnect.");
|
|
568
570
|
}
|
|
571
|
+
console.log("WC request:", { method, params, chainId, topic: currentSession.topic });
|
|
569
572
|
try {
|
|
570
573
|
const result = await signClient.request({
|
|
571
574
|
topic: currentSession.topic,
|
|
@@ -575,8 +578,10 @@ var requestWalletConnect = async (method, params, chainId) => {
|
|
|
575
578
|
params
|
|
576
579
|
}
|
|
577
580
|
});
|
|
581
|
+
console.log("WC response:", result);
|
|
578
582
|
return result;
|
|
579
583
|
} catch (e) {
|
|
584
|
+
console.error("WC request failed:", e);
|
|
580
585
|
throw e;
|
|
581
586
|
}
|
|
582
587
|
};
|
|
@@ -1362,6 +1367,8 @@ var getSolanaWallets = () => {
|
|
|
1362
1367
|
const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).filter((w) => {
|
|
1363
1368
|
return w.constructor.name !== "SolflareMetaMaskWallet";
|
|
1364
1369
|
}).map(createSolanaConnector);
|
|
1370
|
+
console.log("wallets", { wallets });
|
|
1371
|
+
console.log("connectors", { connectors });
|
|
1365
1372
|
addFallbackConnectors(connectors, SOLANA_FALLBACK_CONNECTORS);
|
|
1366
1373
|
return connectors;
|
|
1367
1374
|
};
|
|
@@ -1647,7 +1654,7 @@ var useWalletConnect = (options) => {
|
|
|
1647
1654
|
options.onEvmConnection(getEvmAccountFromSession(session.namespaces));
|
|
1648
1655
|
}
|
|
1649
1656
|
if (session.namespaces.solana?.accounts?.[0] && options.onSolanaConnection) {
|
|
1650
|
-
getSolanaAccountFromSession(session.namespaces).then(options.onSolanaConnection).catch((err) =>
|
|
1657
|
+
getSolanaAccountFromSession(session.namespaces).then(options.onSolanaConnection).catch((err) => console.error("Solana session parse error:", err));
|
|
1651
1658
|
}
|
|
1652
1659
|
};
|
|
1653
1660
|
const existingSession = getCurrentSession();
|