@depay/web3-wallets-evm 16.2.12 → 16.2.14

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/dist/esm/index.js CHANGED
@@ -6,7 +6,7 @@ import { WalletConnectClient } from '@depay/walletconnect-v1';
6
6
  import { SignClient } from '@depay/walletconnect-v2';
7
7
  import { CoinbaseWalletSDK } from '@depay/coinbase-wallet-sdk';
8
8
 
9
- function _optionalChain$p(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
9
+ function _optionalChain$m(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
10
10
  class Transaction {
11
11
 
12
12
  constructor({
@@ -31,7 +31,7 @@ class Transaction {
31
31
  this.to = (to && to.match('0x')) ? ethers.utils.getAddress(to) : to;
32
32
 
33
33
  // optional
34
- this.value = _optionalChain$p([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
34
+ this.value = _optionalChain$m([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
35
35
  this.api = api;
36
36
  this.method = method;
37
37
  this.params = params;
@@ -71,7 +71,7 @@ class Transaction {
71
71
  }
72
72
 
73
73
  getParamType(param) {
74
- if(_optionalChain$p([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
74
+ if(_optionalChain$m([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
75
75
  return `(${param.components.map((param)=>this.getParamType(param)).join(',')})`
76
76
  } else {
77
77
  return param.type
@@ -144,7 +144,7 @@ class Transaction {
144
144
  }
145
145
  }
146
146
 
147
- function _optionalChain$o(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
147
+ function _optionalChain$l(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
148
148
 
149
149
  const POLL_SPEED = 500; // 0.5 seconds
150
150
  const MAX_POLLS = 240; // 120 seconds
@@ -165,14 +165,14 @@ const sendTransaction$4 = async ({ transaction, wallet })=> {
165
165
 
166
166
  const provider = await getProvider(transaction.blockchain);
167
167
  const { value } = await provider.getSignatureStatus(signature);
168
- const confirmationStatus = _optionalChain$o([value, 'optionalAccess', _ => _.confirmationStatus]);
168
+ const confirmationStatus = _optionalChain$l([value, 'optionalAccess', _ => _.confirmationStatus]);
169
169
  if(confirmationStatus) {
170
170
  const hasReachedSufficientCommitment = confirmationStatus === 'confirmed' || confirmationStatus === 'finalized';
171
171
  if (hasReachedSufficientCommitment) {
172
172
  if(value.err) {
173
173
  transaction._failed = true;
174
174
  const confirmedTransaction = await provider.getConfirmedTransaction(signature);
175
- const failedReason = _optionalChain$o([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
175
+ const failedReason = _optionalChain$l([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
176
176
  if(transaction.failed) transaction.failed(transaction, failedReason);
177
177
  } else {
178
178
  transaction._succeeded = true;
@@ -263,7 +263,7 @@ let supported$1 = ['ethereum', 'bsc', 'polygon', 'solana', 'fantom', 'arbitrum',
263
263
  supported$1.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
264
264
  supported$1.solana = ['solana'];
265
265
 
266
- function _optionalChain$n(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
266
+ function _optionalChain$k(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
267
267
  class WindowSolana {
268
268
 
269
269
  static __initStatic() {this.info = {
@@ -274,13 +274,13 @@ class WindowSolana {
274
274
 
275
275
  static __initStatic2() {this.isAvailable = async()=>{
276
276
  return (
277
- _optionalChain$n([window, 'optionalAccess', _5 => _5.solana]) &&
277
+ _optionalChain$k([window, 'optionalAccess', _5 => _5.solana]) &&
278
278
  // not Phantom
279
279
  !(window.phantom && !window.glow && !window.solana.isGlow && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
280
280
  // not Coin98
281
281
  !window.coin98 &&
282
282
  // not BitKeep
283
- !(_optionalChain$n([window, 'optionalAccess', _6 => _6.solana]) && _optionalChain$n([window, 'optionalAccess', _7 => _7.solana, 'access', _8 => _8.isBitKeep])) &&
283
+ !(_optionalChain$k([window, 'optionalAccess', _6 => _6.solana]) && _optionalChain$k([window, 'optionalAccess', _7 => _7.solana, 'access', _8 => _8.isBitKeep])) &&
284
284
  // not Glow
285
285
  !window.solana.isGlow
286
286
  )
@@ -329,7 +329,7 @@ class WindowSolana {
329
329
  let internalCallback;
330
330
  switch (event) {
331
331
  case 'account':
332
- internalCallback = (publicKey) => callback(_optionalChain$n([publicKey, 'optionalAccess', _9 => _9.toString, 'call', _10 => _10()]));
332
+ internalCallback = (publicKey) => callback(_optionalChain$k([publicKey, 'optionalAccess', _9 => _9.toString, 'call', _10 => _10()]));
333
333
  this.getProvider().on('accountChanged', internalCallback);
334
334
  break
335
335
  }
@@ -382,7 +382,7 @@ class WindowSolana {
382
382
  }
383
383
  } WindowSolana.__initStatic(); WindowSolana.__initStatic2();
384
384
 
385
- function _optionalChain$m(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
385
+ function _optionalChain$j(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
386
386
 
387
387
  class Backpack extends WindowSolana {
388
388
 
@@ -394,7 +394,7 @@ class Backpack extends WindowSolana {
394
394
 
395
395
  static __initStatic2() {this.isAvailable = async()=>{
396
396
  return (
397
- _optionalChain$m([window, 'optionalAccess', _2 => _2.backpack]) &&
397
+ _optionalChain$j([window, 'optionalAccess', _2 => _2.backpack]) &&
398
398
  window.backpack.isBackpack
399
399
  )
400
400
  };}
@@ -412,8 +412,6 @@ class Backpack extends WindowSolana {
412
412
  }
413
413
  } Backpack.__initStatic(); Backpack.__initStatic2();
414
414
 
415
- function _optionalChain$l(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
416
-
417
415
  const sendTransaction$3 = async ({ transaction, wallet })=> {
418
416
  transaction = new Transaction(transaction);
419
417
  if((await wallet.connectedTo(transaction.blockchain)) == false) {
@@ -466,7 +464,7 @@ const retrieveConfirmedTransaction$3 = (sentTransaction)=>{
466
464
  try {
467
465
 
468
466
  sentTransaction.wait(1).then(resolve).catch((error)=>{
469
- if(["TypeError: undefined is not an object (evaluating 'error.message')", "TypeError: Cannot read properties of undefined (reading 'message')"].includes(_optionalChain$l([error, 'optionalAccess', _ => _.toString, 'call', _2 => _2()]))) {
467
+ if(error && error.toString().match('undefined')) {
470
468
  setTimeout(()=>{
471
469
  retrieveConfirmedTransaction$3(sentTransaction)
472
470
  .then(resolve)
@@ -477,7 +475,7 @@ const retrieveConfirmedTransaction$3 = (sentTransaction)=>{
477
475
  }
478
476
  });
479
477
  } catch(error) {
480
- if(["TypeError: undefined is not an object (evaluating 'error.message')", "TypeError: Cannot read properties of undefined (reading 'message')"].includes(_optionalChain$l([error, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]))) {
478
+ if(error && error.toString().match('undefined')) {
481
479
  setTimeout(()=>{
482
480
  retrieveConfirmedTransaction$3(sentTransaction)
483
481
  .then(resolve)
@@ -520,7 +518,7 @@ const submitSimpleTransfer$3 = ({ transaction, signer })=>{
520
518
  })
521
519
  };
522
520
 
523
- function _optionalChain$k(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
521
+ function _optionalChain$i(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
524
522
 
525
523
  class WindowEthereum {
526
524
 
@@ -532,31 +530,31 @@ class WindowEthereum {
532
530
 
533
531
  static __initStatic2() {this.isAvailable = async()=>{
534
532
  return (
535
- _optionalChain$k([window, 'optionalAccess', _31 => _31.ethereum]) &&
533
+ _optionalChain$i([window, 'optionalAccess', _31 => _31.ethereum]) &&
536
534
  // not MetaMask
537
- !(_optionalChain$k([window, 'optionalAccess', _32 => _32.ethereum, 'optionalAccess', _33 => _33.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
535
+ !(_optionalChain$i([window, 'optionalAccess', _32 => _32.ethereum, 'optionalAccess', _33 => _33.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
538
536
  // not Coin98
539
- !_optionalChain$k([window, 'optionalAccess', _34 => _34.coin98]) &&
537
+ !_optionalChain$i([window, 'optionalAccess', _34 => _34.coin98]) &&
540
538
  // not Trust Wallet
541
- !(_optionalChain$k([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isTrust]) || _optionalChain$k([window, 'optionalAccess', _37 => _37.ethereum, 'optionalAccess', _38 => _38.isTrustWallet])) &&
539
+ !(_optionalChain$i([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isTrust]) || _optionalChain$i([window, 'optionalAccess', _37 => _37.ethereum, 'optionalAccess', _38 => _38.isTrustWallet])) &&
542
540
  // not crypto.com
543
- !_optionalChain$k([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isDeficonnectProvider]) &&
541
+ !_optionalChain$i([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isDeficonnectProvider]) &&
544
542
  // not HyperPay
545
- !_optionalChain$k([window, 'optionalAccess', _41 => _41.ethereum, 'optionalAccess', _42 => _42.isHyperPay]) &&
543
+ !_optionalChain$i([window, 'optionalAccess', _41 => _41.ethereum, 'optionalAccess', _42 => _42.isHyperPay]) &&
546
544
  // not Phantom
547
- !(window.phantom && !window.glow && !_optionalChain$k([window, 'optionalAccess', _43 => _43.solana, 'optionalAccess', _44 => _44.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
545
+ !(window.phantom && !window.glow && !_optionalChain$i([window, 'optionalAccess', _43 => _43.solana, 'optionalAccess', _44 => _44.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
548
546
  // not Rabby
549
- !_optionalChain$k([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isRabby]) &&
547
+ !_optionalChain$i([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isRabby]) &&
550
548
  // not Backpack
551
- !_optionalChain$k([window, 'optionalAccess', _47 => _47.backpack, 'optionalAccess', _48 => _48.isBackpack]) &&
549
+ !_optionalChain$i([window, 'optionalAccess', _47 => _47.backpack, 'optionalAccess', _48 => _48.isBackpack]) &&
552
550
  // not TokenPocket
553
- !_optionalChain$k([window, 'optionalAccess', _49 => _49.ethereum, 'optionalAccess', _50 => _50.isTokenPocket]) &&
551
+ !_optionalChain$i([window, 'optionalAccess', _49 => _49.ethereum, 'optionalAccess', _50 => _50.isTokenPocket]) &&
554
552
  // not BitKeep
555
- !_optionalChain$k([window, 'optionalAccess', _51 => _51.ethereum, 'optionalAccess', _52 => _52.isBitKeep]) &&
553
+ !_optionalChain$i([window, 'optionalAccess', _51 => _51.ethereum, 'optionalAccess', _52 => _52.isBitKeep]) &&
556
554
  // not Coinbase
557
- !(_optionalChain$k([window, 'optionalAccess', _53 => _53.ethereum, 'optionalAccess', _54 => _54.isCoinbaseWallet]) || _optionalChain$k([window, 'optionalAccess', _55 => _55.ethereum, 'optionalAccess', _56 => _56.isWalletLink])) &&
555
+ !(_optionalChain$i([window, 'optionalAccess', _53 => _53.ethereum, 'optionalAccess', _54 => _54.isCoinbaseWallet]) || _optionalChain$i([window, 'optionalAccess', _55 => _55.ethereum, 'optionalAccess', _56 => _56.isWalletLink])) &&
558
556
  // MetaMask through ProviderMap
559
- !_optionalChain$k([window, 'optionalAccess', _57 => _57.ethereum, 'optionalAccess', _58 => _58.providerMap, 'optionalAccess', _59 => _59.has, 'call', _60 => _60('MetaMask')])
557
+ !_optionalChain$i([window, 'optionalAccess', _57 => _57.ethereum, 'optionalAccess', _58 => _58.providerMap, 'optionalAccess', _59 => _59.has, 'call', _60 => _60('MetaMask')])
560
558
  )
561
559
  };}
562
560
 
@@ -682,7 +680,7 @@ class WindowEthereum {
682
680
  }
683
681
  } WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
684
682
 
685
- function _optionalChain$j(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
683
+ function _optionalChain$h(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
686
684
  class Binance extends WindowEthereum {
687
685
 
688
686
  static __initStatic() {this.info = {
@@ -692,7 +690,7 @@ class Binance extends WindowEthereum {
692
690
  };}
693
691
 
694
692
  static __initStatic2() {this.isAvailable = async()=>{
695
- return _optionalChain$j([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
693
+ return _optionalChain$h([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
696
694
  !window.coin98
697
695
  };}
698
696
 
@@ -700,7 +698,7 @@ class Binance extends WindowEthereum {
700
698
 
701
699
  } Binance.__initStatic(); Binance.__initStatic2();
702
700
 
703
- function _optionalChain$i(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
701
+ function _optionalChain$g(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
704
702
  class Brave extends WindowEthereum {
705
703
 
706
704
  static __initStatic() {this.info = {
@@ -709,10 +707,10 @@ class Brave extends WindowEthereum {
709
707
  blockchains: supported$1.evm
710
708
  };}
711
709
 
712
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$i([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
710
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
713
711
  } Brave.__initStatic(); Brave.__initStatic2();
714
712
 
715
- function _optionalChain$h(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
713
+ function _optionalChain$f(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
716
714
  class Coin98 extends WindowEthereum {
717
715
 
718
716
  static __initStatic() {this.info = {
@@ -721,10 +719,10 @@ class Coin98 extends WindowEthereum {
721
719
  blockchains: supported$1.evm
722
720
  };}
723
721
 
724
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _2 => _2.coin98]) };}
722
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _2 => _2.coin98]) };}
725
723
  } Coin98.__initStatic(); Coin98.__initStatic2();
726
724
 
727
- function _optionalChain$g(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
725
+ function _optionalChain$e(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
728
726
  class Coinbase extends WindowEthereum {
729
727
 
730
728
  static __initStatic() {this.info = {
@@ -734,8 +732,8 @@ class Coinbase extends WindowEthereum {
734
732
  };}
735
733
 
736
734
  getProvider() {
737
- if(_optionalChain$g([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
738
- return _optionalChain$g([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
735
+ if(_optionalChain$e([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
736
+ return _optionalChain$e([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
739
737
  } else {
740
738
  return window.ethereum
741
739
  }
@@ -744,15 +742,15 @@ class Coinbase extends WindowEthereum {
744
742
  static __initStatic2() {this.isAvailable = async()=>{
745
743
  return(
746
744
  (
747
- _optionalChain$g([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$g([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
745
+ _optionalChain$e([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$e([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
748
746
  ) || (
749
- _optionalChain$g([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
747
+ _optionalChain$e([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
750
748
  )
751
749
  )
752
750
  };}
753
751
  } Coinbase.__initStatic(); Coinbase.__initStatic2();
754
752
 
755
- function _optionalChain$f(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
753
+ function _optionalChain$d(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
756
754
  class CryptoCom extends WindowEthereum {
757
755
 
758
756
  static __initStatic() {this.info = {
@@ -761,7 +759,7 @@ class CryptoCom extends WindowEthereum {
761
759
  blockchains: supported$1.evm
762
760
  };}
763
761
 
764
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
762
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
765
763
  } CryptoCom.__initStatic(); CryptoCom.__initStatic2();
766
764
 
767
765
  class Glow extends WindowSolana {
@@ -780,7 +778,7 @@ class Glow extends WindowSolana {
780
778
  };}
781
779
  } Glow.__initStatic(); Glow.__initStatic2();
782
780
 
783
- function _optionalChain$e(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
781
+ function _optionalChain$c(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
784
782
  class HyperPay extends WindowEthereum {
785
783
 
786
784
  static __initStatic() {this.info = {
@@ -789,10 +787,10 @@ class HyperPay extends WindowEthereum {
789
787
  blockchains: supported$1.evm
790
788
  };}
791
789
 
792
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
790
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
793
791
  } HyperPay.__initStatic(); HyperPay.__initStatic2();
794
792
 
795
- function _optionalChain$d(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
793
+ function _optionalChain$b(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
796
794
  class MetaMask extends WindowEthereum {
797
795
 
798
796
  static __initStatic() {this.info = {
@@ -802,8 +800,8 @@ class MetaMask extends WindowEthereum {
802
800
  };}
803
801
 
804
802
  getProvider() {
805
- if(_optionalChain$d([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.providerMap, 'optionalAccess', _9 => _9.has, 'call', _10 => _10('MetaMask')])) {
806
- return _optionalChain$d([window, 'optionalAccess', _11 => _11.ethereum, 'optionalAccess', _12 => _12.providerMap, 'optionalAccess', _13 => _13.get, 'call', _14 => _14('MetaMask')])
803
+ if(_optionalChain$b([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.providerMap, 'optionalAccess', _9 => _9.has, 'call', _10 => _10('MetaMask')])) {
804
+ return _optionalChain$b([window, 'optionalAccess', _11 => _11.ethereum, 'optionalAccess', _12 => _12.providerMap, 'optionalAccess', _13 => _13.get, 'call', _14 => _14('MetaMask')])
807
805
  } else {
808
806
  return window.ethereum
809
807
  }
@@ -812,16 +810,16 @@ class MetaMask extends WindowEthereum {
812
810
  static __initStatic2() {this.isAvailable = async()=>{
813
811
  return(
814
812
  (
815
- _optionalChain$d([window, 'optionalAccess', _15 => _15.ethereum, 'optionalAccess', _16 => _16.isMetaMask]) &&
813
+ _optionalChain$b([window, 'optionalAccess', _15 => _15.ethereum, 'optionalAccess', _16 => _16.isMetaMask]) &&
816
814
  Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
817
815
  ) || (
818
- _optionalChain$d([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.providerMap, 'optionalAccess', _19 => _19.has, 'call', _20 => _20('MetaMask')])
816
+ _optionalChain$b([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.providerMap, 'optionalAccess', _19 => _19.has, 'call', _20 => _20('MetaMask')])
819
817
  )
820
818
  )
821
819
  };}
822
820
  } MetaMask.__initStatic(); MetaMask.__initStatic2();
823
821
 
824
- function _optionalChain$c(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
822
+ function _optionalChain$a(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
825
823
  class Opera extends WindowEthereum {
826
824
 
827
825
  static __initStatic() {this.info = {
@@ -830,10 +828,10 @@ class Opera extends WindowEthereum {
830
828
  blockchains: supported$1.evm
831
829
  };}
832
830
 
833
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
831
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$a([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
834
832
  } Opera.__initStatic(); Opera.__initStatic2();
835
833
 
836
- function _optionalChain$b(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
834
+ function _optionalChain$9(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
837
835
  class Phantom extends WindowSolana {
838
836
 
839
837
  static __initStatic() {this.info = {
@@ -846,13 +844,13 @@ class Phantom extends WindowSolana {
846
844
  return (
847
845
  window.phantom &&
848
846
  !window.glow &&
849
- !_optionalChain$b([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isGlow]) &&
847
+ !_optionalChain$9([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isGlow]) &&
850
848
  !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])
851
849
  )
852
850
  };}
853
851
  } Phantom.__initStatic(); Phantom.__initStatic2();
854
852
 
855
- function _optionalChain$a(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
853
+ function _optionalChain$8(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
856
854
  class Rabby extends WindowEthereum {
857
855
 
858
856
  static __initStatic() {this.info = {
@@ -863,12 +861,12 @@ class Rabby extends WindowEthereum {
863
861
 
864
862
  static __initStatic2() {this.isAvailable = async()=>{
865
863
  return(
866
- _optionalChain$a([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
864
+ _optionalChain$8([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
867
865
  )
868
866
  };}
869
867
  } Rabby.__initStatic(); Rabby.__initStatic2();
870
868
 
871
- function _optionalChain$9(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
869
+ function _optionalChain$7(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
872
870
 
873
871
 
874
872
  const KEY$2 = '_DePayWeb3WalletsConnectedSolanaMobileWalletInstance';
@@ -959,8 +957,8 @@ class SolanaMobileWalletAdapter {
959
957
  await transact(
960
958
  async (wallet) => {
961
959
  await this.authorize(wallet);
962
- if(_optionalChain$9([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$2+'_name'] = this.name = options.name; }
963
- if(_optionalChain$9([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$2+'_logo'] = this.logo = options.logo; }
960
+ if(_optionalChain$7([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$2+'_name'] = this.name = options.name; }
961
+ if(_optionalChain$7([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$2+'_logo'] = this.logo = options.logo; }
964
962
  }
965
963
  );
966
964
  return this._account
@@ -1019,7 +1017,7 @@ class SolanaMobileWalletAdapter {
1019
1017
  }
1020
1018
  } SolanaMobileWalletAdapter.__initStatic(); SolanaMobileWalletAdapter.__initStatic2();
1021
1019
 
1022
- function _optionalChain$8(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1020
+ function _optionalChain$6(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1023
1021
  class Solflare extends WindowSolana {
1024
1022
 
1025
1023
  static __initStatic() {this.info = {
@@ -1030,7 +1028,7 @@ class Solflare extends WindowSolana {
1030
1028
 
1031
1029
  static __initStatic2() {this.isAvailable = async()=>{
1032
1030
  return (
1033
- _optionalChain$8([window, 'optionalAccess', _2 => _2.solflare]) &&
1031
+ _optionalChain$6([window, 'optionalAccess', _2 => _2.solflare]) &&
1034
1032
  window.solflare.isSolflare
1035
1033
  )
1036
1034
  };}
@@ -1040,7 +1038,7 @@ class Solflare extends WindowSolana {
1040
1038
  _sendTransaction(transaction) { return this.getProvider().signTransaction(transaction) }
1041
1039
  } Solflare.__initStatic(); Solflare.__initStatic2();
1042
1040
 
1043
- function _optionalChain$7(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1041
+ function _optionalChain$5(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1044
1042
  class TokenPocket extends WindowEthereum {
1045
1043
 
1046
1044
  static __initStatic() {this.info = {
@@ -1051,12 +1049,12 @@ class TokenPocket extends WindowEthereum {
1051
1049
 
1052
1050
  static __initStatic2() {this.isAvailable = async()=>{
1053
1051
  return (
1054
- _optionalChain$7([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
1052
+ _optionalChain$5([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
1055
1053
  )
1056
1054
  };}
1057
1055
  } TokenPocket.__initStatic(); TokenPocket.__initStatic2();
1058
1056
 
1059
- function _optionalChain$6(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1057
+ function _optionalChain$4(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1060
1058
  class Trust extends WindowEthereum {
1061
1059
 
1062
1060
  static __initStatic() {this.info = {
@@ -1067,7 +1065,7 @@ class Trust extends WindowEthereum {
1067
1065
 
1068
1066
  static __initStatic2() {this.isAvailable = async()=>{
1069
1067
  return (
1070
- (_optionalChain$6([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$6([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
1068
+ (_optionalChain$4([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$4([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
1071
1069
  Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
1072
1070
  )
1073
1071
  };}
@@ -1077,12 +1075,22 @@ const transactionApiBlockchainNames = {
1077
1075
  'ethereum': 'mainnet',
1078
1076
  'bsc': 'bsc',
1079
1077
  'polygon': 'polygon',
1078
+ 'arbitrum': 'arbitrum',
1079
+ 'base': 'base',
1080
+ 'avalanche': 'avalanche',
1081
+ 'gnosis': 'gnosis-chain',
1082
+ 'optimism': 'optimism',
1080
1083
  };
1081
1084
 
1082
1085
  const explorerBlockchainNames = {
1083
1086
  'ethereum': 'eth',
1084
1087
  'bsc': 'bnb',
1085
1088
  'polygon': 'matic',
1089
+ 'arbitrum': 'arb1',
1090
+ 'base': 'base',
1091
+ 'avalanche': 'avax',
1092
+ 'gnosis': 'gno',
1093
+ 'optimism': 'oeth',
1086
1094
  };
1087
1095
 
1088
1096
  class Safe {
@@ -1162,7 +1170,7 @@ const getSmartContractWallet = async(blockchain, address)=> {
1162
1170
  }
1163
1171
  };
1164
1172
 
1165
- function _optionalChain$5(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1173
+ function _optionalChain$3(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1166
1174
 
1167
1175
  const sendTransaction$2 = async ({ transaction, wallet })=> {
1168
1176
  transaction = new Transaction(transaction);
@@ -1215,7 +1223,7 @@ const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
1215
1223
  try {
1216
1224
 
1217
1225
  sentTransaction.wait(1).then(resolve).catch((error)=>{
1218
- if(["TypeError: undefined is not an object (evaluating 'error.message')", "TypeError: Cannot read properties of undefined (reading 'message')"].includes(_optionalChain$5([error, 'optionalAccess', _ => _.toString, 'call', _2 => _2()]))) {
1226
+ if(error && error.toString().match('undefined')) {
1219
1227
  setTimeout(()=>{
1220
1228
  retrieveConfirmedTransaction$2(sentTransaction)
1221
1229
  .then(resolve)
@@ -1226,7 +1234,7 @@ const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
1226
1234
  }
1227
1235
  });
1228
1236
  } catch (error) {
1229
- if(["TypeError: undefined is not an object (evaluating 'error.message')", "TypeError: Cannot read properties of undefined (reading 'message')"].includes(_optionalChain$5([error, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]))) {
1237
+ if(error && error.toString().match('undefined')) {
1230
1238
  setTimeout(()=>{
1231
1239
  retrieveConfirmedTransaction$2(sentTransaction)
1232
1240
  .then(resolve)
@@ -1271,7 +1279,7 @@ const submit$2 = ({ transaction, wallet }) => {
1271
1279
  const submitContractInteraction$2 = async ({ transaction, wallet })=>{
1272
1280
  const provider = await getProvider(transaction.blockchain);
1273
1281
  let gasPrice = await provider.getGasPrice();
1274
- if(_optionalChain$5([wallet, 'access', _5 => _5.session, 'optionalAccess', _6 => _6.peerMeta, 'optionalAccess', _7 => _7.name]) === 'Uniswap Wallet') {
1282
+ if(_optionalChain$3([wallet, 'access', _ => _.session, 'optionalAccess', _2 => _2.peerMeta, 'optionalAccess', _3 => _3.name]) === 'Uniswap Wallet') {
1275
1283
  gasPrice = undefined;
1276
1284
  } else {
1277
1285
  gasPrice = gasPrice.toHexString();
@@ -1295,7 +1303,7 @@ const submitContractInteraction$2 = async ({ transaction, wallet })=>{
1295
1303
  const submitSimpleTransfer$2 = async ({ transaction, wallet })=>{
1296
1304
  const provider = await getProvider(transaction.blockchain);
1297
1305
  let gasPrice = await provider.getGasPrice();
1298
- if(_optionalChain$5([wallet, 'access', _8 => _8.session, 'optionalAccess', _9 => _9.peerMeta, 'optionalAccess', _10 => _10.name]) === 'Uniswap Wallet') {
1306
+ if(_optionalChain$3([wallet, 'access', _4 => _4.session, 'optionalAccess', _5 => _5.peerMeta, 'optionalAccess', _6 => _6.name]) === 'Uniswap Wallet') {
1299
1307
  gasPrice = undefined;
1300
1308
  } else {
1301
1309
  gasPrice = gasPrice.toHexString();
@@ -1314,7 +1322,7 @@ const submitSimpleTransfer$2 = async ({ transaction, wallet })=>{
1314
1322
  })
1315
1323
  };
1316
1324
 
1317
- function _optionalChain$4(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1325
+ function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1318
1326
 
1319
1327
  const KEY$1 = '_DePayWeb3WalletsConnectedWalletConnectV1Instance';
1320
1328
 
@@ -1457,8 +1465,8 @@ class WalletConnectV1 {
1457
1465
  let session = await this.connector.connect();
1458
1466
  this.session = session;
1459
1467
 
1460
- if(_optionalChain$4([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
1461
- if(_optionalChain$4([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
1468
+ if(_optionalChain$2([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
1469
+ if(_optionalChain$2([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
1462
1470
 
1463
1471
  if(session.accounts instanceof Array && session.accounts.length) {
1464
1472
  setConnectedInstance$1(this);
@@ -1602,8 +1610,6 @@ class WalletConnectV1 {
1602
1610
  WalletConnectV1.getConnectedInstance = getConnectedInstance$2;
1603
1611
  WalletConnectV1.setConnectedInstance = setConnectedInstance$1;
1604
1612
 
1605
- function _optionalChain$3(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1606
-
1607
1613
  const sendTransaction$1 = async ({ transaction, wallet })=> {
1608
1614
  transaction = new Transaction(transaction);
1609
1615
  if((await wallet.connectedTo(transaction.blockchain)) == false) {
@@ -1655,7 +1661,7 @@ const retrieveConfirmedTransaction$1 = (sentTransaction)=>{
1655
1661
  return new Promise((resolve, reject)=>{
1656
1662
  try {
1657
1663
  sentTransaction.wait(1).then(resolve).catch((error)=>{
1658
- if(["TypeError: undefined is not an object (evaluating 'error.message')", "TypeError: Cannot read properties of undefined (reading 'message')"].includes(_optionalChain$3([error, 'optionalAccess', _ => _.toString, 'call', _2 => _2()]))) {
1664
+ if(error && error.toString().match('undefined')) {
1659
1665
  setTimeout(()=>{
1660
1666
  retrieveConfirmedTransaction$1(sentTransaction)
1661
1667
  .then(resolve)
@@ -1666,7 +1672,7 @@ const retrieveConfirmedTransaction$1 = (sentTransaction)=>{
1666
1672
  }
1667
1673
  });
1668
1674
  } catch (error) {
1669
- if(["TypeError: undefined is not an object (evaluating 'error.message')", "TypeError: Cannot read properties of undefined (reading 'message')"].includes(_optionalChain$3([error, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]))) {
1675
+ if(error && error.toString().match('undefined')) {
1670
1676
  setTimeout(()=>{
1671
1677
  retrieveConfirmedTransaction$1(sentTransaction)
1672
1678
  .then(resolve)
@@ -1694,7 +1700,7 @@ const retrieveTransaction = (tx, blockchain)=>{
1694
1700
  }
1695
1701
  resolve(sentTransaction);
1696
1702
  } catch (error) {
1697
- if(["TypeError: undefined is not an object (evaluating 'error.message')", "TypeError: Cannot read properties of undefined (reading 'message')"].includes(_optionalChain$3([error, 'optionalAccess', _5 => _5.toString, 'call', _6 => _6()]))) {
1703
+ if(error && error.toString().match('undefined')) {
1698
1704
  setTimeout(()=>{
1699
1705
  retrieveTransaction(tx, blockchain)
1700
1706
  .then(resolve)
@@ -1760,7 +1766,7 @@ const submitSimpleTransfer$1 = async ({ transaction, wallet })=>{
1760
1766
  }).catch((e)=>{console.log('ERROR', e);})
1761
1767
  };
1762
1768
 
1763
- function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1769
+ function _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1764
1770
 
1765
1771
  const KEY = 'depay:wallets:wc2';
1766
1772
 
@@ -1879,11 +1885,11 @@ const getLastSession = async(walletName)=>{
1879
1885
  };
1880
1886
 
1881
1887
  const getWalletConnectV2Config = (walletName)=>{
1882
- const methods = _optionalChain$2([CONFIGURATIONS, 'access', _ => _[walletName], 'optionalAccess', _2 => _2.methods]) || DEFAULT_CONFIGURATION.methods;
1883
- const events = _optionalChain$2([CONFIGURATIONS, 'access', _3 => _3[walletName], 'optionalAccess', _4 => _4.events]) || DEFAULT_CONFIGURATION.events;
1888
+ const methods = _optionalChain$1([CONFIGURATIONS, 'access', _ => _[walletName], 'optionalAccess', _2 => _2.methods]) || DEFAULT_CONFIGURATION.methods;
1889
+ const events = _optionalChain$1([CONFIGURATIONS, 'access', _3 => _3[walletName], 'optionalAccess', _4 => _4.events]) || DEFAULT_CONFIGURATION.events;
1884
1890
 
1885
1891
  let requiredNamespaces = {};
1886
- if(_optionalChain$2([CONFIGURATIONS, 'access', _5 => _5[walletName], 'optionalAccess', _6 => _6.requiredNamespaces])) {
1892
+ if(_optionalChain$1([CONFIGURATIONS, 'access', _5 => _5[walletName], 'optionalAccess', _6 => _6.requiredNamespaces])) {
1887
1893
  requiredNamespaces = CONFIGURATIONS[walletName].requiredNamespaces;
1888
1894
  } else {
1889
1895
  requiredNamespaces['eip155'] = {
@@ -1896,14 +1902,14 @@ const getWalletConnectV2Config = (walletName)=>{
1896
1902
  }
1897
1903
 
1898
1904
  let optionalNamespaces = {};
1899
- if(_optionalChain$2([CONFIGURATIONS, 'access', _7 => _7[walletName], 'optionalAccess', _8 => _8.optionalNamespaces])) {
1905
+ if(_optionalChain$1([CONFIGURATIONS, 'access', _7 => _7[walletName], 'optionalAccess', _8 => _8.optionalNamespaces])) {
1900
1906
  optionalNamespaces = CONFIGURATIONS[walletName].optionalNamespaces;
1901
1907
  } else {
1902
1908
  optionalNamespaces['eip155'] = {
1903
1909
  chains: supported$1.evm.map((blockchain)=>`${Blockchains[blockchain].namespace}:${Blockchains[blockchain].networkId}`),
1904
1910
  };
1905
1911
  }
1906
- if(_optionalChain$2([optionalNamespaces, 'optionalAccess', _9 => _9.eip155]) && _optionalChain$2([optionalNamespaces, 'optionalAccess', _10 => _10.eip155, 'optionalAccess', _11 => _11.chains, 'optionalAccess', _12 => _12.length])) {
1912
+ if(_optionalChain$1([optionalNamespaces, 'optionalAccess', _9 => _9.eip155]) && _optionalChain$1([optionalNamespaces, 'optionalAccess', _10 => _10.eip155, 'optionalAccess', _11 => _11.chains, 'optionalAccess', _12 => _12.length])) {
1907
1913
  optionalNamespaces['eip155'].methods = methods;
1908
1914
  optionalNamespaces['eip155'].events = events;
1909
1915
  }
@@ -1918,9 +1924,9 @@ const getSignClient = ()=>{
1918
1924
  projectId: localStorage[KEY+":projectId"],
1919
1925
  metadata: {
1920
1926
  name: document.title || 'dApp',
1921
- description: _optionalChain$2([document, 'access', _13 => _13.querySelector, 'call', _14 => _14('meta[name="description"]'), 'optionalAccess', _15 => _15.getAttribute, 'call', _16 => _16('content')]) || document.title || 'dApp',
1927
+ description: _optionalChain$1([document, 'access', _13 => _13.querySelector, 'call', _14 => _14('meta[name="description"]'), 'optionalAccess', _15 => _15.getAttribute, 'call', _16 => _16('content')]) || document.title || 'dApp',
1922
1928
  url: location.href,
1923
- icons: [_optionalChain$2([document, 'access', _17 => _17.querySelector, 'call', _18 => _18("link[rel~='icon'], link[rel~='shortcut icon']"), 'optionalAccess', _19 => _19.href]) || `${location.origin}/favicon.ico`]
1929
+ icons: [_optionalChain$1([document, 'access', _17 => _17.querySelector, 'call', _18 => _18("link[rel~='icon'], link[rel~='shortcut icon']"), 'optionalAccess', _19 => _19.href]) || `${location.origin}/favicon.ico`]
1924
1930
  }
1925
1931
  });
1926
1932
  resolve(signClient);
@@ -1938,7 +1944,7 @@ class WalletConnectV2 {
1938
1944
  };}
1939
1945
 
1940
1946
  static __initStatic2() {this.isAvailable = async(options)=>{
1941
- return !! await getLastSession(_optionalChain$2([options, 'optionalAccess', _21 => _21.walletName]))
1947
+ return !! await getLastSession(_optionalChain$1([options, 'optionalAccess', _21 => _21.walletName]))
1942
1948
  };}
1943
1949
 
1944
1950
  constructor() {
@@ -1953,19 +1959,19 @@ class WalletConnectV2 {
1953
1959
  }
1954
1960
 
1955
1961
  async account() {
1956
- if(_optionalChain$2([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.namespaces, 'optionalAccess', _24 => _24.eip155, 'optionalAccess', _25 => _25.accounts, 'optionalAccess', _26 => _26.length])) {
1962
+ if(_optionalChain$1([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.namespaces, 'optionalAccess', _24 => _24.eip155, 'optionalAccess', _25 => _25.accounts, 'optionalAccess', _26 => _26.length])) {
1957
1963
  return this.session.namespaces.eip155.accounts[0].split(':')[2]
1958
1964
  }
1959
1965
  }
1960
1966
 
1961
1967
  async setSessionBlockchains() {
1962
- if(!this.session || !_optionalChain$2([this, 'access', _27 => _27.session, 'optionalAccess', _28 => _28.namespaces, 'optionalAccess', _29 => _29.eip155])) { return }
1963
- if(_optionalChain$2([CONFIGURATIONS, 'access', _30 => _30[this.walletName], 'optionalAccess', _31 => _31.methods, 'optionalAccess', _32 => _32.includes, 'call', _33 => _33('wallet_switchEthereumChain')])) {
1964
- this.blockchains = [this.session.namespaces.eip155.chains[this.session.namespaces.eip155.chains.length-1]].map((chainIdentifier)=>_optionalChain$2([Blockchains, 'access', _34 => _34.findByNetworkId, 'call', _35 => _35(chainIdentifier.split(':')[1]), 'optionalAccess', _36 => _36.name])).filter(Boolean);
1968
+ if(!this.session || !_optionalChain$1([this, 'access', _27 => _27.session, 'optionalAccess', _28 => _28.namespaces, 'optionalAccess', _29 => _29.eip155])) { return }
1969
+ if(_optionalChain$1([CONFIGURATIONS, 'access', _30 => _30[this.walletName], 'optionalAccess', _31 => _31.methods, 'optionalAccess', _32 => _32.includes, 'call', _33 => _33('wallet_switchEthereumChain')])) {
1970
+ this.blockchains = [this.session.namespaces.eip155.chains[this.session.namespaces.eip155.chains.length-1]].map((chainIdentifier)=>_optionalChain$1([Blockchains, 'access', _34 => _34.findByNetworkId, 'call', _35 => _35(chainIdentifier.split(':')[1]), 'optionalAccess', _36 => _36.name])).filter(Boolean);
1965
1971
  } else if(this.session.namespaces.eip155.chains) {
1966
- this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$2([Blockchains, 'access', _37 => _37.findByNetworkId, 'call', _38 => _38(chainIdentifier.split(':')[1]), 'optionalAccess', _39 => _39.name])).filter(Boolean);
1972
+ this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$1([Blockchains, 'access', _37 => _37.findByNetworkId, 'call', _38 => _38(chainIdentifier.split(':')[1]), 'optionalAccess', _39 => _39.name])).filter(Boolean);
1967
1973
  } else if(this.session.namespaces.eip155.accounts) {
1968
- this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$2([Blockchains, 'access', _40 => _40.findByNetworkId, 'call', _41 => _41(accountIdentifier.split(':')[1]), 'optionalAccess', _42 => _42.name])).filter(Boolean);
1974
+ this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$1([Blockchains, 'access', _40 => _40.findByNetworkId, 'call', _41 => _41(accountIdentifier.split(':')[1]), 'optionalAccess', _42 => _42.name])).filter(Boolean);
1969
1975
  }
1970
1976
  }
1971
1977
 
@@ -1975,13 +1981,13 @@ class WalletConnectV2 {
1975
1981
 
1976
1982
  try {
1977
1983
 
1978
- this.walletName = _optionalChain$2([options, 'optionalAccess', _43 => _43.name]);
1984
+ this.walletName = _optionalChain$1([options, 'optionalAccess', _43 => _43.name]);
1979
1985
 
1980
1986
  // delete localStorage[`wc@2:client:0.3//session`] // DELETE WC SESSIONS
1981
1987
  this.signClient = await getSignClient();
1982
1988
 
1983
1989
  this.signClient.on("session_delete", (session)=> {
1984
- if(_optionalChain$2([session, 'optionalAccess', _44 => _44.topic]) === _optionalChain$2([this, 'access', _45 => _45.session, 'optionalAccess', _46 => _46.topic])) {
1990
+ if(_optionalChain$1([session, 'optionalAccess', _44 => _44.topic]) === _optionalChain$1([this, 'access', _45 => _45.session, 'optionalAccess', _46 => _46.topic])) {
1985
1991
  localStorage[KEY+':name'] = undefined;
1986
1992
  localStorage[KEY+':logo'] = undefined;
1987
1993
  this.signClient = undefined;
@@ -1990,14 +1996,14 @@ class WalletConnectV2 {
1990
1996
  });
1991
1997
 
1992
1998
  this.signClient.on("session_update", async(session)=> {
1993
- if(_optionalChain$2([session, 'optionalAccess', _47 => _47.topic]) === _optionalChain$2([this, 'access', _48 => _48.session, 'optionalAccess', _49 => _49.topic])) {
1999
+ if(_optionalChain$1([session, 'optionalAccess', _47 => _47.topic]) === _optionalChain$1([this, 'access', _48 => _48.session, 'optionalAccess', _49 => _49.topic])) {
1994
2000
  this.session = this.signClient.session.get(session.topic);
1995
2001
  await this.setSessionBlockchains();
1996
2002
  }
1997
2003
  });
1998
2004
 
1999
2005
  this.signClient.on("session_event", (event)=> {
2000
- if(_optionalChain$2([event, 'optionalAccess', _50 => _50.topic]) === _optionalChain$2([this, 'access', _51 => _51.session, 'optionalAccess', _52 => _52.topic])) {}
2006
+ if(_optionalChain$1([event, 'optionalAccess', _50 => _50.topic]) === _optionalChain$1([this, 'access', _51 => _51.session, 'optionalAccess', _52 => _52.topic])) {}
2001
2007
  });
2002
2008
 
2003
2009
  const connectWallet = async()=>{
@@ -2008,24 +2014,24 @@ class WalletConnectV2 {
2008
2014
  await new Promise(resolve=>setTimeout(resolve, 500)); // to prevent race condition within WalletConnect
2009
2015
  };
2010
2016
 
2011
- const lastSession = _optionalChain$2([this, 'optionalAccess', _53 => _53.walletName, 'optionalAccess', _54 => _54.length]) ? await getLastSession(this.walletName) : undefined;
2017
+ const lastSession = _optionalChain$1([this, 'optionalAccess', _53 => _53.walletName, 'optionalAccess', _54 => _54.length]) ? await getLastSession(this.walletName) : undefined;
2012
2018
  if(lastSession) {
2013
2019
  this.session = lastSession;
2014
2020
  } else {
2015
2021
  await connectWallet();
2016
2022
  }
2017
2023
 
2018
- let meta = _optionalChain$2([this, 'access', _55 => _55.session, 'optionalAccess', _56 => _56.peer, 'optionalAccess', _57 => _57.metadata]);
2024
+ let meta = _optionalChain$1([this, 'access', _55 => _55.session, 'optionalAccess', _56 => _56.peer, 'optionalAccess', _57 => _57.metadata]);
2019
2025
  if(meta && meta.name) {
2020
2026
  this.name = meta.name;
2021
2027
  localStorage[KEY+':name'] = meta.name;
2022
- if(_optionalChain$2([meta, 'optionalAccess', _58 => _58.icons]) && meta.icons.length) {
2028
+ if(_optionalChain$1([meta, 'optionalAccess', _58 => _58.icons]) && meta.icons.length) {
2023
2029
  this.logo = meta.icons[0];
2024
2030
  localStorage[KEY+':logo'] = this.logo;
2025
2031
  }
2026
2032
  }
2027
- if(_optionalChain$2([options, 'optionalAccess', _59 => _59.name])) { localStorage[KEY+':name'] = this.name = options.name; }
2028
- if(_optionalChain$2([options, 'optionalAccess', _60 => _60.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
2033
+ if(_optionalChain$1([options, 'optionalAccess', _59 => _59.name])) { localStorage[KEY+':name'] = this.name = options.name; }
2034
+ if(_optionalChain$1([options, 'optionalAccess', _60 => _60.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
2029
2035
 
2030
2036
  await this.setSessionBlockchains();
2031
2037
 
@@ -2082,7 +2088,7 @@ class WalletConnectV2 {
2082
2088
  switch (event) {
2083
2089
  case 'account':
2084
2090
  internalCallback = async(event)=> {
2085
- if(_optionalChain$2([event, 'optionalAccess', _61 => _61.topic]) === _optionalChain$2([this, 'access', _62 => _62.session, 'optionalAccess', _63 => _63.topic]) && event.params.event.name === 'accountsChanged') {
2091
+ if(_optionalChain$1([event, 'optionalAccess', _61 => _61.topic]) === _optionalChain$1([this, 'access', _62 => _62.session, 'optionalAccess', _63 => _63.topic]) && event.params.event.name === 'accountsChanged') {
2086
2092
  callback(await this.account());
2087
2093
  }
2088
2094
  };
@@ -2142,7 +2148,6 @@ class WalletConnectV2 {
2142
2148
 
2143
2149
  WalletConnectV2.getConnectedInstance = getConnectedInstance$1;
2144
2150
 
2145
- function _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2146
2151
  const sendTransaction = async ({ transaction, wallet })=> {
2147
2152
  transaction = new Transaction(transaction);
2148
2153
  if((await wallet.connectedTo(transaction.blockchain)) == false) {
@@ -2193,7 +2198,7 @@ const retrieveConfirmedTransaction = (sentTransaction)=>{
2193
2198
  try {
2194
2199
 
2195
2200
  sentTransaction.wait(1).then(resolve).catch((error)=>{
2196
- if(["TypeError: undefined is not an object (evaluating 'error.message')", "TypeError: Cannot read properties of undefined (reading 'message')"].includes(_optionalChain$1([error, 'optionalAccess', _ => _.toString, 'call', _2 => _2()]))) {
2201
+ if(error && error.toString().match('undefined')) {
2197
2202
  setTimeout(()=>{
2198
2203
  retrieveConfirmedTransaction(sentTransaction)
2199
2204
  .then(resolve)
@@ -2204,7 +2209,7 @@ const retrieveConfirmedTransaction = (sentTransaction)=>{
2204
2209
  }
2205
2210
  });
2206
2211
  } catch(error) {
2207
- if(["TypeError: undefined is not an object (evaluating 'error.message')", "TypeError: Cannot read properties of undefined (reading 'message')"].includes(_optionalChain$1([error, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]))) {
2212
+ if(error && error.toString().match('undefined')) {
2208
2213
  setTimeout(()=>{
2209
2214
  retrieveConfirmedTransaction(sentTransaction)
2210
2215
  .then(resolve)