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 CHANGED
@@ -2295,7 +2295,10 @@ function useBtcWalletSelector() {
2295
2295
  });
2296
2296
  }),
2297
2297
  logout: () => {
2298
- disconnect && disconnect();
2298
+ const accountId = accounts && accounts.length ? accounts[0] : null;
2299
+ if (!accountId)
2300
+ return;
2301
+ disconnect == null ? void 0 : disconnect();
2299
2302
  context.emit("btcLogOut");
2300
2303
  },
2301
2304
  account: accounts && accounts.length ? accounts[0] : null,
@@ -2746,6 +2749,11 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
2746
2749
  }
2747
2750
  function signOut() {
2748
2751
  return __async(this, null, function* () {
2752
+ const accountId = state.getAccount();
2753
+ const publicKey = state.getPublicKey();
2754
+ if (!(accountId && publicKey)) {
2755
+ return;
2756
+ }
2749
2757
  const btcContext = window.btcContext;
2750
2758
  if (metadata.syncLogOut) {
2751
2759
  btcContext.logout();
@@ -3090,7 +3098,7 @@ function executeBurrowSupply(_0) {
3090
3098
 
3091
3099
  // src/index.ts
3092
3100
  var getVersion = () => {
3093
- return "0.2.8";
3101
+ return "0.3.0";
3094
3102
  };
3095
3103
  if (typeof window !== "undefined") {
3096
3104
  window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();