@satoshai/kit 1.0.1 → 1.0.3
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.cjs +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -656,6 +656,11 @@ declare const useBnsName: (address?: string) => {
|
|
|
656
656
|
* (install link), and whether it's `available` (extension detected or
|
|
657
657
|
* WalletConnect configured).
|
|
658
658
|
*
|
|
659
|
+
* Performs a fresh check of `window` globals on every render so that
|
|
660
|
+
* browser extensions injected after React hydration are detected by the
|
|
661
|
+
* time the consumer reads the wallet list (e.g. when a connect-wallet
|
|
662
|
+
* drawer opens).
|
|
663
|
+
*
|
|
659
664
|
* @example
|
|
660
665
|
* ```ts
|
|
661
666
|
* const { wallets } = useWallets();
|
|
@@ -668,7 +673,13 @@ declare const useBnsName: (address?: string) => {
|
|
|
668
673
|
* ```
|
|
669
674
|
*/
|
|
670
675
|
declare const useWallets: () => {
|
|
671
|
-
wallets:
|
|
676
|
+
wallets: {
|
|
677
|
+
available: boolean;
|
|
678
|
+
id: SupportedStacksWallet;
|
|
679
|
+
name: string;
|
|
680
|
+
icon: string;
|
|
681
|
+
webUrl: string;
|
|
682
|
+
}[];
|
|
672
683
|
};
|
|
673
684
|
|
|
674
685
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -656,6 +656,11 @@ declare const useBnsName: (address?: string) => {
|
|
|
656
656
|
* (install link), and whether it's `available` (extension detected or
|
|
657
657
|
* WalletConnect configured).
|
|
658
658
|
*
|
|
659
|
+
* Performs a fresh check of `window` globals on every render so that
|
|
660
|
+
* browser extensions injected after React hydration are detected by the
|
|
661
|
+
* time the consumer reads the wallet list (e.g. when a connect-wallet
|
|
662
|
+
* drawer opens).
|
|
663
|
+
*
|
|
659
664
|
* @example
|
|
660
665
|
* ```ts
|
|
661
666
|
* const { wallets } = useWallets();
|
|
@@ -668,7 +673,13 @@ declare const useBnsName: (address?: string) => {
|
|
|
668
673
|
* ```
|
|
669
674
|
*/
|
|
670
675
|
declare const useWallets: () => {
|
|
671
|
-
wallets:
|
|
676
|
+
wallets: {
|
|
677
|
+
available: boolean;
|
|
678
|
+
id: SupportedStacksWallet;
|
|
679
|
+
name: string;
|
|
680
|
+
icon: string;
|
|
681
|
+
webUrl: string;
|
|
682
|
+
}[];
|
|
672
683
|
};
|
|
673
684
|
|
|
674
685
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1473,7 +1473,20 @@ var useBnsName = (address) => {
|
|
|
1473
1473
|
};
|
|
1474
1474
|
var useWallets = () => {
|
|
1475
1475
|
const { wallets } = useStacksWalletContext();
|
|
1476
|
-
|
|
1476
|
+
const { installed } = getStacksWallets();
|
|
1477
|
+
const installedKey = installed.join(",");
|
|
1478
|
+
return useMemo(
|
|
1479
|
+
() => ({
|
|
1480
|
+
wallets: wallets.map((w) => ({
|
|
1481
|
+
...w,
|
|
1482
|
+
// wallet-connect availability is controlled by projectId in
|
|
1483
|
+
// the provider — don't override with getStacksWallets() which
|
|
1484
|
+
// unconditionally returns true for it.
|
|
1485
|
+
available: w.id === "wallet-connect" ? w.available : w.available || installed.includes(w.id)
|
|
1486
|
+
}))
|
|
1487
|
+
}),
|
|
1488
|
+
[wallets, installedKey]
|
|
1489
|
+
);
|
|
1477
1490
|
};
|
|
1478
1491
|
|
|
1479
1492
|
// src/utils/create-contract-config.ts
|