btc-wallet 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -2415,6 +2415,9 @@ function createIframe({
2415
2415
  iframe.id = "satoshi-wallet-iframe";
2416
2416
  iframe.allow = "clipboard-read; clipboard-write";
2417
2417
  iframe.src = iframeUrl;
2418
+ iframe.onclick = () => {
2419
+ iframe.focus();
2420
+ };
2418
2421
  Object.assign(iframe.style, __spreadValues({
2419
2422
  position: "fixed",
2420
2423
  bottom: "90px",
@@ -2553,11 +2556,8 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
2553
2556
  if (btcContext) {
2554
2557
  clearInterval(inter);
2555
2558
  const context = btcContext.getContext();
2556
- const accountId = state.getAccount();
2557
- initWalletButton(options.network.networkId, accountId, wallet);
2558
2559
  context.on("updatePublicKey", (btcPublicKey) => __async(void 0, null, function* () {
2559
2560
  const { nearTempAddress } = yield getNearAccountByBtcPublicKey(btcPublicKey);
2560
- initWalletButton(options.network.networkId, nearTempAddress, wallet);
2561
2561
  emitter.emit("accountsChanged", {
2562
2562
  accounts: [
2563
2563
  {
@@ -2578,6 +2578,7 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
2578
2578
  }
2579
2579
  }), 500);
2580
2580
  }
2581
+ initWalletButton(options.network.networkId, state.getAccount(), wallet);
2581
2582
  function viewMethod(_02) {
2582
2583
  return __async(this, arguments, function* ({ method, args = {} }) {
2583
2584
  const res = yield provider.query({
@@ -2603,6 +2604,7 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
2603
2604
  state.saveAccount(nearTempAddress);
2604
2605
  state.savePublicKey(nearTempPublicKey);
2605
2606
  state.saveBtcPublicKey(btcPublicKey);
2607
+ initWalletButton(options.network.networkId, nearTempAddress, wallet);
2606
2608
  return {
2607
2609
  nearTempAddress,
2608
2610
  nearTempPublicKey
@@ -2625,7 +2627,6 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
2625
2627
  const btcAccount = yield btcContext.login();
2626
2628
  const btcPublicKey = yield btcContext.getPublicKey();
2627
2629
  const { nearTempAddress, nearTempPublicKey } = yield getNearAccountByBtcPublicKey(btcPublicKey);
2628
- initWalletButton(options.network.networkId, accountId, wallet);
2629
2630
  return [
2630
2631
  {
2631
2632
  accountId: nearTempAddress,
@@ -2869,7 +2870,7 @@ function pollTransactionStatuses(network, hashes) {
2869
2870
 
2870
2871
  // src/index.ts
2871
2872
  var getVersion = () => {
2872
- return "0.1.1";
2873
+ return "0.1.2";
2873
2874
  };
2874
2875
  if (typeof window !== "undefined") {
2875
2876
  window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();