@sats-connect/core 0.0.5-4f78052 → 0.0.5
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/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -500,8 +500,10 @@ var UnisatAdapter = class extends SatsConnectAdapter {
|
|
|
500
500
|
if (!purposes.includes("stacks" /* Stacks */)) {
|
|
501
501
|
throw new Error("Only bitcoin addresses are supported");
|
|
502
502
|
}
|
|
503
|
-
const accounts = await
|
|
504
|
-
|
|
503
|
+
const [accounts, publicKey] = await Promise.all([
|
|
504
|
+
window.unisat.requestAccounts(),
|
|
505
|
+
window.unisat.getPublicKey()
|
|
506
|
+
]);
|
|
505
507
|
const address = accounts[0];
|
|
506
508
|
const addressType = getAddressInfo(accounts[0]).type;
|
|
507
509
|
const pk = addressType === AddressType2.p2tr ? publicKey.slice(2) : publicKey;
|