btc-wallet 0.1.1 → 0.1.2

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/esm/index.js CHANGED
@@ -2374,6 +2374,9 @@ function createIframe({
2374
2374
  iframe.id = "satoshi-wallet-iframe";
2375
2375
  iframe.allow = "clipboard-read; clipboard-write";
2376
2376
  iframe.src = iframeUrl;
2377
+ iframe.onclick = () => {
2378
+ iframe.focus();
2379
+ };
2377
2380
  Object.assign(iframe.style, __spreadValues({
2378
2381
  position: "fixed",
2379
2382
  bottom: "90px",
@@ -2512,11 +2515,8 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
2512
2515
  if (btcContext) {
2513
2516
  clearInterval(inter);
2514
2517
  const context = btcContext.getContext();
2515
- const accountId = state.getAccount();
2516
- initWalletButton(options.network.networkId, accountId, wallet);
2517
2518
  context.on("updatePublicKey", (btcPublicKey) => __async(void 0, null, function* () {
2518
2519
  const { nearTempAddress } = yield getNearAccountByBtcPublicKey(btcPublicKey);
2519
- initWalletButton(options.network.networkId, nearTempAddress, wallet);
2520
2520
  emitter.emit("accountsChanged", {
2521
2521
  accounts: [
2522
2522
  {
@@ -2537,6 +2537,7 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
2537
2537
  }
2538
2538
  }), 500);
2539
2539
  }
2540
+ initWalletButton(options.network.networkId, state.getAccount(), wallet);
2540
2541
  function viewMethod(_02) {
2541
2542
  return __async(this, arguments, function* ({ method, args = {} }) {
2542
2543
  const res = yield provider.query({
@@ -2562,6 +2563,7 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
2562
2563
  state.saveAccount(nearTempAddress);
2563
2564
  state.savePublicKey(nearTempPublicKey);
2564
2565
  state.saveBtcPublicKey(btcPublicKey);
2566
+ initWalletButton(options.network.networkId, nearTempAddress, wallet);
2565
2567
  return {
2566
2568
  nearTempAddress,
2567
2569
  nearTempPublicKey
@@ -2584,7 +2586,6 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
2584
2586
  const btcAccount = yield btcContext.login();
2585
2587
  const btcPublicKey = yield btcContext.getPublicKey();
2586
2588
  const { nearTempAddress, nearTempPublicKey } = yield getNearAccountByBtcPublicKey(btcPublicKey);
2587
- initWalletButton(options.network.networkId, accountId, wallet);
2588
2589
  return [
2589
2590
  {
2590
2591
  accountId: nearTempAddress,
@@ -2828,7 +2829,7 @@ function pollTransactionStatuses(network, hashes) {
2828
2829
 
2829
2830
  // src/index.ts
2830
2831
  var getVersion = () => {
2831
- return "0.1.1";
2832
+ return "0.1.2";
2832
2833
  };
2833
2834
  if (typeof window !== "undefined") {
2834
2835
  window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();