btc-wallet 0.2.8 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +10 -2
- package/dist/index.js.map +2 -2
- package/esm/index.js +10 -2
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/esm/index.js
CHANGED
@@ -2260,7 +2260,10 @@ function useBtcWalletSelector() {
|
|
2260
2260
|
});
|
2261
2261
|
}),
|
2262
2262
|
logout: () => {
|
2263
|
-
|
2263
|
+
const accountId = accounts && accounts.length ? accounts[0] : null;
|
2264
|
+
if (!accountId)
|
2265
|
+
return;
|
2266
|
+
disconnect == null ? void 0 : disconnect();
|
2264
2267
|
context.emit("btcLogOut");
|
2265
2268
|
},
|
2266
2269
|
account: accounts && accounts.length ? accounts[0] : null,
|
@@ -2711,6 +2714,11 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
2711
2714
|
}
|
2712
2715
|
function signOut() {
|
2713
2716
|
return __async(this, null, function* () {
|
2717
|
+
const accountId = state.getAccount();
|
2718
|
+
const publicKey = state.getPublicKey();
|
2719
|
+
if (!(accountId && publicKey)) {
|
2720
|
+
return;
|
2721
|
+
}
|
2714
2722
|
const btcContext = window.btcContext;
|
2715
2723
|
if (metadata.syncLogOut) {
|
2716
2724
|
btcContext.logout();
|
@@ -3055,7 +3063,7 @@ function executeBurrowSupply(_0) {
|
|
3055
3063
|
|
3056
3064
|
// src/index.ts
|
3057
3065
|
var getVersion = () => {
|
3058
|
-
return "0.
|
3066
|
+
return "0.3.0";
|
3059
3067
|
};
|
3060
3068
|
if (typeof window !== "undefined") {
|
3061
3069
|
window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();
|