@sats-connect/core 0.0.5 → 0.0.6-92acf81
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 +5 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -387,10 +387,11 @@ function removeDefaultProvider() {
|
|
|
387
387
|
}
|
|
388
388
|
function getSupportedWallets() {
|
|
389
389
|
const btc_providers = getProviders();
|
|
390
|
+
const allProviders = [...btc_providers];
|
|
390
391
|
for (const key in omit(DefaultAdaptersInfo, ["xverse"])) {
|
|
391
|
-
|
|
392
|
+
allProviders.push(DefaultAdaptersInfo[key]);
|
|
392
393
|
}
|
|
393
|
-
const wallets =
|
|
394
|
+
const wallets = allProviders.map((provider) => {
|
|
394
395
|
{
|
|
395
396
|
return {
|
|
396
397
|
...provider,
|
|
@@ -500,10 +501,8 @@ var UnisatAdapter = class extends SatsConnectAdapter {
|
|
|
500
501
|
if (!purposes.includes("stacks" /* Stacks */)) {
|
|
501
502
|
throw new Error("Only bitcoin addresses are supported");
|
|
502
503
|
}
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
window.unisat.getPublicKey()
|
|
506
|
-
]);
|
|
504
|
+
const accounts = await window.unisat.requestAccounts();
|
|
505
|
+
const publicKey = await window.unisat.getPublicKey();
|
|
507
506
|
const address = accounts[0];
|
|
508
507
|
const addressType = getAddressInfo(accounts[0]).type;
|
|
509
508
|
const pk = addressType === AddressType2.p2tr ? publicKey.slice(2) : publicKey;
|