sui.ski 0.1.2 → 0.1.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/package.json +1 -1
- package/src/utils/wallet-kit-js.ts +10 -1
package/package.json
CHANGED
|
@@ -731,7 +731,16 @@ export function generateWalletKitJs(config: WalletKitConfig): string {
|
|
|
731
731
|
iframeReady = false;
|
|
732
732
|
}
|
|
733
733
|
var options = { useStaging: useStaging, config: config };
|
|
734
|
-
var
|
|
734
|
+
var rawWaaPWallet = mod.initWaaPSui(options);
|
|
735
|
+
// Wrap with safe accounts getter so external consumers (dapp-kit-core
|
|
736
|
+
// autoconnect) never see undefined — they get [] until WaaP finishes login.
|
|
737
|
+
var wallet = Object.create(rawWaaPWallet, {
|
|
738
|
+
accounts: {
|
|
739
|
+
get: function() { return __wkSafeGetAccounts(rawWaaPWallet); },
|
|
740
|
+
enumerable: true,
|
|
741
|
+
configurable: true
|
|
742
|
+
}
|
|
743
|
+
});
|
|
735
744
|
__wkInitWalletsApi();
|
|
736
745
|
if (__wkWalletsApi && typeof __wkWalletsApi.register === 'function') {
|
|
737
746
|
__wkWalletsApi.register(wallet);
|