@depay/web3-wallets-evm 16.5.4 → 17.1.0

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.
@@ -1,7 +1,6 @@
1
1
  import { request, estimate, getProvider } from '@depay/web3-client-evm';
2
2
  import Blockchains from '@depay/web3-blockchains';
3
3
  import { ethers } from 'ethers';
4
- import { WalletConnectClient } from '@depay/walletconnect-v1';
5
4
  import { SignClient } from '@depay/walletconnect-v2';
6
5
  import { CoinbaseWalletSDK } from '@depay/coinbase-wallet-sdk';
7
6
 
@@ -9,7 +8,7 @@ let supported$1 = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanch
9
8
  supported$1.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
10
9
  supported$1.solana = [];
11
10
 
12
- 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; }
11
+ 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; }
13
12
  class Transaction {
14
13
 
15
14
  constructor({
@@ -34,7 +33,7 @@ class Transaction {
34
33
  this.to = (to && to.match('0x')) ? ethers.utils.getAddress(to) : to;
35
34
 
36
35
  // optional
37
- this.value = _optionalChain$n([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
36
+ this.value = _optionalChain$m([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
38
37
  this.api = api;
39
38
  this.method = method;
40
39
  this.params = params;
@@ -74,7 +73,7 @@ class Transaction {
74
73
  }
75
74
 
76
75
  getParamType(param) {
77
- if(_optionalChain$n([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
76
+ if(_optionalChain$m([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
78
77
  return `(${param.components.map((param)=>this.getParamType(param)).join(',')})`
79
78
  } else {
80
79
  return param.type
@@ -147,9 +146,9 @@ class Transaction {
147
146
  }
148
147
  }
149
148
 
150
- 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; }
149
+ 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; }
151
150
 
152
- const sendTransaction$3 = async ({ transaction, wallet })=> {
151
+ const sendTransaction$2 = async ({ transaction, wallet })=> {
153
152
  transaction = new Transaction(transaction);
154
153
  if((await wallet.connectedTo(transaction.blockchain)) == false) {
155
154
  await wallet.switchTo(transaction.blockchain);
@@ -162,13 +161,13 @@ const sendTransaction$3 = async ({ transaction, wallet })=> {
162
161
  transaction.nonce = transactionCount;
163
162
  let provider = new ethers.providers.Web3Provider(wallet.getProvider(), 'any');
164
163
  let signer = provider.getSigner(0);
165
- await submit$3({ transaction, provider, signer }).then((sentTransaction)=>{
164
+ await submit$2({ transaction, provider, signer }).then((sentTransaction)=>{
166
165
  if (sentTransaction) {
167
166
  transaction.id = sentTransaction.hash;
168
167
  transaction.nonce = sentTransaction.nonce || transactionCount;
169
168
  transaction.url = Blockchains.findByName(transaction.blockchain).explorerUrlFor({ transaction });
170
169
  if (transaction.sent) transaction.sent(transaction);
171
- retrieveConfirmedTransaction$3(sentTransaction).then(() => {
170
+ retrieveConfirmedTransaction$2(sentTransaction).then(() => {
172
171
  transaction._succeeded = true;
173
172
  if (transaction.succeeded) transaction.succeeded(transaction);
174
173
  }).catch((error)=>{
@@ -196,17 +195,17 @@ const sendTransaction$3 = async ({ transaction, wallet })=> {
196
195
  return transaction
197
196
  };
198
197
 
199
- const retrieveConfirmedTransaction$3 = (sentTransaction)=>{
198
+ const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
200
199
  return new Promise((resolve, reject)=>{
201
200
  try {
202
201
 
203
202
  sentTransaction.wait(1).then(resolve).catch((error)=>{
204
203
  if(
205
- (error && _optionalChain$m([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
204
+ (error && _optionalChain$l([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
206
205
  (error && error.toString().match('undefined'))
207
206
  ) {
208
207
  setTimeout(()=>{
209
- retrieveConfirmedTransaction$3(sentTransaction)
208
+ retrieveConfirmedTransaction$2(sentTransaction)
210
209
  .then(resolve)
211
210
  .catch(reject);
212
211
  }, 500);
@@ -216,11 +215,11 @@ const retrieveConfirmedTransaction$3 = (sentTransaction)=>{
216
215
  });
217
216
  } catch(error) {
218
217
  if(
219
- (error && _optionalChain$m([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
218
+ (error && _optionalChain$l([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
220
219
  (error && error.toString().match('undefined'))
221
220
  ) {
222
221
  setTimeout(()=>{
223
- retrieveConfirmedTransaction$3(sentTransaction)
222
+ retrieveConfirmedTransaction$2(sentTransaction)
224
223
  .then(resolve)
225
224
  .catch(reject);
226
225
  }, 500);
@@ -231,15 +230,15 @@ const retrieveConfirmedTransaction$3 = (sentTransaction)=>{
231
230
  })
232
231
  };
233
232
 
234
- const submit$3 = ({ transaction, provider, signer }) => {
233
+ const submit$2 = ({ transaction, provider, signer }) => {
235
234
  if(transaction.method) {
236
- return submitContractInteraction$3({ transaction, signer, provider })
235
+ return submitContractInteraction$2({ transaction, signer, provider })
237
236
  } else {
238
- return submitSimpleTransfer$3({ transaction, signer })
237
+ return submitSimpleTransfer$2({ transaction, signer })
239
238
  }
240
239
  };
241
240
 
242
- const submitContractInteraction$3 = async ({ transaction, signer, provider })=>{
241
+ const submitContractInteraction$2 = async ({ transaction, signer, provider })=>{
243
242
  let contract = new ethers.Contract(transaction.to, transaction.api, provider);
244
243
  let contractArguments = transaction.getContractArguments({ contract });
245
244
  let method = contract.connect(signer)[transaction.getMethodNameWithSignature()];
@@ -251,24 +250,24 @@ const submitContractInteraction$3 = async ({ transaction, signer, provider })=>{
251
250
  if(contractArguments) {
252
251
  return await method(...contractArguments, {
253
252
  value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
254
- gasLimit: _optionalChain$m([gas, 'optionalAccess', _7 => _7.toHexString, 'call', _8 => _8()])
253
+ gasLimit: _optionalChain$l([gas, 'optionalAccess', _7 => _7.toHexString, 'call', _8 => _8()])
255
254
  })
256
255
  } else {
257
256
  return await method({
258
257
  value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
259
- gasLimit: _optionalChain$m([gas, 'optionalAccess', _9 => _9.toHexString, 'call', _10 => _10()])
258
+ gasLimit: _optionalChain$l([gas, 'optionalAccess', _9 => _9.toHexString, 'call', _10 => _10()])
260
259
  })
261
260
  }
262
261
  };
263
262
 
264
- const submitSimpleTransfer$3 = ({ transaction, signer })=>{
263
+ const submitSimpleTransfer$2 = ({ transaction, signer })=>{
265
264
  return signer.sendTransaction({
266
265
  to: transaction.to,
267
266
  value: Transaction.bigNumberify(transaction.value, transaction.blockchain)
268
267
  })
269
268
  };
270
269
 
271
- 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; }
270
+ 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; }
272
271
 
273
272
  class WindowEthereum {
274
273
 
@@ -280,35 +279,37 @@ class WindowEthereum {
280
279
 
281
280
  static __initStatic2() {this.isAvailable = async()=>{
282
281
  return (
283
- _optionalChain$l([window, 'optionalAccess', _34 => _34.ethereum]) &&
282
+ _optionalChain$k([window, 'optionalAccess', _36 => _36.ethereum]) &&
284
283
  // not MetaMask
285
- !(_optionalChain$l([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
284
+ !(_optionalChain$k([window, 'optionalAccess', _37 => _37.ethereum, 'optionalAccess', _38 => _38.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
286
285
  // not Coin98
287
- !_optionalChain$l([window, 'optionalAccess', _37 => _37.coin98]) &&
286
+ !_optionalChain$k([window, 'optionalAccess', _39 => _39.coin98]) &&
288
287
  // not Trust Wallet
289
- !(_optionalChain$l([window, 'optionalAccess', _38 => _38.ethereum, 'optionalAccess', _39 => _39.isTrust]) || _optionalChain$l([window, 'optionalAccess', _40 => _40.ethereum, 'optionalAccess', _41 => _41.isTrustWallet])) &&
288
+ !(_optionalChain$k([window, 'optionalAccess', _40 => _40.ethereum, 'optionalAccess', _41 => _41.isTrust]) || _optionalChain$k([window, 'optionalAccess', _42 => _42.ethereum, 'optionalAccess', _43 => _43.isTrustWallet])) &&
290
289
  // not crypto.com
291
- !_optionalChain$l([window, 'optionalAccess', _42 => _42.ethereum, 'optionalAccess', _43 => _43.isDeficonnectProvider]) &&
290
+ !_optionalChain$k([window, 'optionalAccess', _44 => _44.ethereum, 'optionalAccess', _45 => _45.isDeficonnectProvider]) &&
292
291
  // not HyperPay
293
- !_optionalChain$l([window, 'optionalAccess', _44 => _44.ethereum, 'optionalAccess', _45 => _45.isHyperPay]) &&
292
+ !_optionalChain$k([window, 'optionalAccess', _46 => _46.ethereum, 'optionalAccess', _47 => _47.isHyperPay]) &&
294
293
  // not Phantom
295
- !(window.phantom && !window.glow && !_optionalChain$l([window, 'optionalAccess', _46 => _46.solana, 'optionalAccess', _47 => _47.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
294
+ !(window.phantom && !window.glow && !_optionalChain$k([window, 'optionalAccess', _48 => _48.solana, 'optionalAccess', _49 => _49.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
296
295
  // not Rabby
297
- !_optionalChain$l([window, 'optionalAccess', _48 => _48.ethereum, 'optionalAccess', _49 => _49.isRabby]) &&
296
+ !_optionalChain$k([window, 'optionalAccess', _50 => _50.ethereum, 'optionalAccess', _51 => _51.isRabby]) &&
298
297
  // not Backpack
299
- !_optionalChain$l([window, 'optionalAccess', _50 => _50.backpack, 'optionalAccess', _51 => _51.isBackpack]) &&
298
+ !_optionalChain$k([window, 'optionalAccess', _52 => _52.backpack, 'optionalAccess', _53 => _53.isBackpack]) &&
300
299
  // not TokenPocket
301
- !_optionalChain$l([window, 'optionalAccess', _52 => _52.ethereum, 'optionalAccess', _53 => _53.isTokenPocket]) &&
300
+ !_optionalChain$k([window, 'optionalAccess', _54 => _54.ethereum, 'optionalAccess', _55 => _55.isTokenPocket]) &&
302
301
  // not BitKeep
303
- !_optionalChain$l([window, 'optionalAccess', _54 => _54.ethereum, 'optionalAccess', _55 => _55.isBitKeep]) &&
302
+ !_optionalChain$k([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isBitKeep]) &&
304
303
  // not Coinbase
305
- !(_optionalChain$l([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isCoinbaseWallet]) || _optionalChain$l([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isWalletLink])) &&
304
+ !(_optionalChain$k([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isCoinbaseWallet]) || _optionalChain$k([window, 'optionalAccess', _60 => _60.ethereum, 'optionalAccess', _61 => _61.isWalletLink])) &&
306
305
  // MetaMask through ProviderMap
307
- !_optionalChain$l([window, 'optionalAccess', _60 => _60.ethereum, 'optionalAccess', _61 => _61.providerMap, 'optionalAccess', _62 => _62.has, 'call', _63 => _63('MetaMask')]) &&
306
+ !_optionalChain$k([window, 'optionalAccess', _62 => _62.ethereum, 'optionalAccess', _63 => _63.providerMap, 'optionalAccess', _64 => _64.has, 'call', _65 => _65('MetaMask')]) &&
308
307
  // Brave Wallet
309
- !_optionalChain$l([window, 'optionalAccess', _64 => _64.ethereum, 'optionalAccess', _65 => _65.isBraveWallet]) &&
308
+ !_optionalChain$k([window, 'optionalAccess', _66 => _66.ethereum, 'optionalAccess', _67 => _67.isBraveWallet]) &&
309
+ // Uniswap Wallet
310
+ !_optionalChain$k([window, 'optionalAccess', _68 => _68.ethereum, 'optionalAccess', _69 => _69.isUniswapWallet]) &&
310
311
  // OKX Wallet
311
- !_optionalChain$l([window, 'optionalAccess', _66 => _66.okxwallet])
312
+ !_optionalChain$k([window, 'optionalAccess', _70 => _70.okxwallet])
312
313
  )
313
314
  };}
314
315
 
@@ -317,7 +318,7 @@ class WindowEthereum {
317
318
  this.logo = this.constructor.info.logo;
318
319
  this.blockchains = this.constructor.info.blockchains;
319
320
  this.sendTransaction = (transaction)=>{
320
- return sendTransaction$3({
321
+ return sendTransaction$2({
321
322
  wallet: this,
322
323
  transaction
323
324
  })
@@ -434,7 +435,7 @@ class WindowEthereum {
434
435
  }
435
436
  } WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
436
437
 
437
- 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; }
438
+ 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; }
438
439
  class Binance extends WindowEthereum {
439
440
 
440
441
  static __initStatic() {this.info = {
@@ -444,7 +445,7 @@ class Binance extends WindowEthereum {
444
445
  };}
445
446
 
446
447
  static __initStatic2() {this.isAvailable = async()=>{
447
- return _optionalChain$k([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
448
+ return _optionalChain$j([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
448
449
  !window.coin98 &&
449
450
  !window.trustwallet
450
451
  };}
@@ -464,7 +465,7 @@ var logos = {
464
465
  okx: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMzYuMSAzMzYuMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzM2LjEgMzM2LjE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPHBhdGggZD0iTTMxMy43LDBIMjIuNEMxMCwwLDAsMTAsMCwyMi40djI5MS4zYzAsMTIuNCwxMCwyMi40LDIyLjQsMjIuNGgyOTEuM2MxMi40LDAsMjIuNC0xMCwyMi40LTIyLjRWMjIuNAoJQzMzNi4xLDEwLDMyNi4xLDAsMzEzLjcsMHoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIwNC41LDEzMC43aC02NC43Yy0yLjcsMC01LDIuMi01LDV2NjQuN2MwLDIuNywyLjIsNSw1LDVoNjQuN2MyLjcsMCw1LTIuMiw1LTV2LTY0LjcKCUMyMDkuNSwxMzIuOSwyMDcuMiwxMzAuNywyMDQuNSwxMzAuN3oiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyOS44LDU2LjFINjUuMWMtMi43LDAtNSwyLjItNSw1djY0LjdjMCwyLjcsMi4yLDUsNSw1aDY0LjdjMi44LDAsNS0yLjIsNS01VjYxCglDMTM0LjgsNTguMywxMzIuNSw1Ni4xLDEyOS44LDU2LjF6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNzkuMSw1Ni4xaC02NC43Yy0yLjcsMC01LDIuMi01LDV2NjQuN2MwLDIuNywyLjIsNSw1LDVoNjQuN2MyLjcsMCw1LTIuMiw1LTVWNjEKCUMyODQuMSw1OC4zLDI4MS45LDU2LjEsMjc5LjEsNTYuMXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyOS44LDIwNS40SDY1LjFjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuOCwwLDUtMi4yLDUtNXYtNjQuNwoJQzEzNC44LDIwNy42LDEzMi41LDIwNS40LDEyOS44LDIwNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjc5LjEsMjA1LjRoLTY0LjdjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuNywwLDUtMi4yLDUtNXYtNjQuNwoJQzI4NC4xLDIwNy42LDI4MS45LDIwNS40LDI3OS4xLDIwNS40eiIvPgo8L3N2Zz4K",
465
466
  };
466
467
 
467
- 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; }
468
+ 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; }
468
469
  class BraveEVM extends WindowEthereum {
469
470
 
470
471
  static __initStatic() {this.info = {
@@ -474,14 +475,14 @@ class BraveEVM extends WindowEthereum {
474
475
  platform: 'evm',
475
476
  };}
476
477
 
477
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$j([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
478
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$i([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
478
479
 
479
480
  getProvider() {
480
481
  return window.ethereum
481
482
  }
482
483
  } BraveEVM.__initStatic(); BraveEVM.__initStatic2();
483
484
 
484
- 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; }
485
+ 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; }
485
486
  class Coin98EVM extends WindowEthereum {
486
487
 
487
488
  static __initStatic() {this.info = {
@@ -491,13 +492,13 @@ class Coin98EVM extends WindowEthereum {
491
492
  platform: 'evm',
492
493
  };}
493
494
 
494
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$i([window, 'optionalAccess', _2 => _2.coin98]) };}
495
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _2 => _2.coin98]) };}
495
496
 
496
497
  getProvider() { return window.coin98.provider }
497
498
 
498
499
  } Coin98EVM.__initStatic(); Coin98EVM.__initStatic2();
499
500
 
500
- 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; }
501
+ 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; }
501
502
  class CoinbaseEVM extends WindowEthereum {
502
503
 
503
504
  static __initStatic() {this.info = {
@@ -508,8 +509,8 @@ class CoinbaseEVM extends WindowEthereum {
508
509
  };}
509
510
 
510
511
  getProvider() {
511
- if(_optionalChain$h([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
512
- return _optionalChain$h([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
512
+ if(_optionalChain$g([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
513
+ return _optionalChain$g([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
513
514
  } else {
514
515
  return window.ethereum
515
516
  }
@@ -518,15 +519,15 @@ class CoinbaseEVM extends WindowEthereum {
518
519
  static __initStatic2() {this.isAvailable = async()=>{
519
520
  return(
520
521
  (
521
- _optionalChain$h([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$h([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
522
+ _optionalChain$g([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$g([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
522
523
  ) || (
523
- _optionalChain$h([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
524
+ _optionalChain$g([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
524
525
  )
525
526
  )
526
527
  };}
527
528
  } CoinbaseEVM.__initStatic(); CoinbaseEVM.__initStatic2();
528
529
 
529
- 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; }
530
+ 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; }
530
531
  class CryptoCom extends WindowEthereum {
531
532
 
532
533
  static __initStatic() {this.info = {
@@ -535,10 +536,10 @@ class CryptoCom extends WindowEthereum {
535
536
  blockchains: supported$1.evm
536
537
  };}
537
538
 
538
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
539
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
539
540
  } CryptoCom.__initStatic(); CryptoCom.__initStatic2();
540
541
 
541
- 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; }
542
+ 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; }
542
543
  class ExodusEVM extends WindowEthereum {
543
544
 
544
545
  static __initStatic() {this.info = {
@@ -548,10 +549,10 @@ class ExodusEVM extends WindowEthereum {
548
549
  platform: 'evm',
549
550
  };}
550
551
 
551
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
552
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
552
553
  } ExodusEVM.__initStatic(); ExodusEVM.__initStatic2();
553
554
 
554
- 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; }
555
+ 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; }
555
556
  class HyperPay extends WindowEthereum {
556
557
 
557
558
  static __initStatic() {this.info = {
@@ -560,10 +561,10 @@ class HyperPay extends WindowEthereum {
560
561
  blockchains: supported$1.evm
561
562
  };}
562
563
 
563
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
564
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
564
565
  } HyperPay.__initStatic(); HyperPay.__initStatic2();
565
566
 
566
- 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; }
567
+ 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; }
567
568
  class MagicEdenEVM extends WindowEthereum {
568
569
 
569
570
  static __initStatic() {this.info = {
@@ -575,12 +576,12 @@ class MagicEdenEVM extends WindowEthereum {
575
576
 
576
577
  static __initStatic2() {this.isAvailable = async()=>{
577
578
  return (
578
- _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMagicEden])
579
+ _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMagicEden])
579
580
  )
580
581
  };}
581
582
  } MagicEdenEVM.__initStatic(); MagicEdenEVM.__initStatic2();
582
583
 
583
- 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; }
584
+ 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; }
584
585
  class OKXEVM extends WindowEthereum {
585
586
 
586
587
  static __initStatic() {this.info = {
@@ -592,12 +593,12 @@ class OKXEVM extends WindowEthereum {
592
593
 
593
594
  static __initStatic2() {this.isAvailable = async()=>{
594
595
  return (
595
- _optionalChain$c([window, 'optionalAccess', _2 => _2.okxwallet])
596
+ _optionalChain$b([window, 'optionalAccess', _2 => _2.okxwallet])
596
597
  )
597
598
  };}
598
599
  } OKXEVM.__initStatic(); OKXEVM.__initStatic2();
599
600
 
600
- 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; }
601
+ 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; }
601
602
  class MetaMask extends WindowEthereum {
602
603
 
603
604
  static __initStatic() {this.info = {
@@ -607,8 +608,8 @@ class MetaMask extends WindowEthereum {
607
608
  };}
608
609
 
609
610
  getProvider() {
610
- if(_optionalChain$b([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.providerMap, 'optionalAccess', _9 => _9.has, 'call', _10 => _10('MetaMask')])) {
611
- return _optionalChain$b([window, 'optionalAccess', _11 => _11.ethereum, 'optionalAccess', _12 => _12.providerMap, 'optionalAccess', _13 => _13.get, 'call', _14 => _14('MetaMask')])
611
+ if(_optionalChain$a([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.providerMap, 'optionalAccess', _9 => _9.has, 'call', _10 => _10('MetaMask')])) {
612
+ return _optionalChain$a([window, 'optionalAccess', _11 => _11.ethereum, 'optionalAccess', _12 => _12.providerMap, 'optionalAccess', _13 => _13.get, 'call', _14 => _14('MetaMask')])
612
613
  } else {
613
614
  return window.ethereum
614
615
  }
@@ -617,16 +618,16 @@ class MetaMask extends WindowEthereum {
617
618
  static __initStatic2() {this.isAvailable = async()=>{
618
619
  return(
619
620
  (
620
- _optionalChain$b([window, 'optionalAccess', _15 => _15.ethereum, 'optionalAccess', _16 => _16.isMetaMask]) &&
621
+ _optionalChain$a([window, 'optionalAccess', _15 => _15.ethereum, 'optionalAccess', _16 => _16.isMetaMask]) &&
621
622
  Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
622
623
  ) || (
623
- _optionalChain$b([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.providerMap, 'optionalAccess', _19 => _19.has, 'call', _20 => _20('MetaMask')])
624
+ _optionalChain$a([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.providerMap, 'optionalAccess', _19 => _19.has, 'call', _20 => _20('MetaMask')])
624
625
  )
625
626
  )
626
627
  };}
627
628
  } MetaMask.__initStatic(); MetaMask.__initStatic2();
628
629
 
629
- 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; }
630
+ 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; }
630
631
  class Opera extends WindowEthereum {
631
632
 
632
633
  static __initStatic() {this.info = {
@@ -635,10 +636,10 @@ class Opera extends WindowEthereum {
635
636
  blockchains: supported$1.evm
636
637
  };}
637
638
 
638
- static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$a([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
639
+ static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
639
640
  } Opera.__initStatic(); Opera.__initStatic2();
640
641
 
641
- 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; }
642
+ 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; }
642
643
  class PhantomEVM extends WindowEthereum {
643
644
 
644
645
  static __initStatic() {this.info = {
@@ -652,13 +653,13 @@ class PhantomEVM extends WindowEthereum {
652
653
  return (
653
654
  window.phantom &&
654
655
  window.phantom.ethereum &&
655
- ! _optionalChain$9([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
656
- ! _optionalChain$9([window, 'optionalAccess', _6 => _6.okxwallet])
656
+ ! _optionalChain$8([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
657
+ ! _optionalChain$8([window, 'optionalAccess', _6 => _6.okxwallet])
657
658
  )
658
659
  };}
659
660
  } PhantomEVM.__initStatic(); PhantomEVM.__initStatic2();
660
661
 
661
- 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; }
662
+ 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; }
662
663
  class Rabby extends WindowEthereum {
663
664
 
664
665
  static __initStatic() {this.info = {
@@ -669,12 +670,28 @@ class Rabby extends WindowEthereum {
669
670
 
670
671
  static __initStatic2() {this.isAvailable = async()=>{
671
672
  return(
672
- _optionalChain$8([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
673
+ _optionalChain$7([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
673
674
  )
674
675
  };}
675
676
  } Rabby.__initStatic(); Rabby.__initStatic2();
676
677
 
677
- 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; }
678
+ 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; }
679
+ class Uniswap extends WindowEthereum {
680
+
681
+ static __initStatic() {this.info = {
682
+ name: 'Uniswap',
683
+ logo: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQxIiBoZWlnaHQ9IjY0MCIgdmlld0JveD0iMCAwIDY0MSA2NDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMjQuNTM0IDEyMy4yMjZDMjE4LjY5MiAxMjIuMzIgMjE4LjQ0NSAxMjIuMjEzIDIyMS4xOTUgMTIxLjc5MUMyMjYuNDY0IDEyMC45OCAyMzguOTA1IDEyMi4wODUgMjQ3LjQ3OSAxMjQuMTIzQzI2Ny40OTQgMTI4Ljg4MSAyODUuNzA3IDE0MS4wNjkgMzA1LjE0OCAxNjIuNzE0TDMxMC4zMTMgMTY4LjQ2NUwzMTcuNzAxIDE2Ny4yNzdDMzQ4LjgyOCAxNjIuMjc1IDM4MC40OTMgMTY2LjI1IDQwNi45NzggMTc4LjQ4NUM0MTQuMjY0IDE4MS44NTEgNDI1Ljc1MiAxODguNTUyIDQyNy4xODcgMTkwLjI3NEM0MjcuNjQ1IDE5MC44MjIgNDI4LjQ4NSAxOTQuMzU1IDQyOS4wNTMgMTk4LjEyNEM0MzEuMDIgMjExLjE2NCA0MzAuMDM2IDIyMS4xNiA0MjYuMDQ3IDIyOC42MjVDNDIzLjg3NyAyMzIuNjg4IDQyMy43NTYgMjMzLjk3NSA0MjUuMjE1IDIzNy40NTJDNDI2LjM4IDI0MC4yMjcgNDI5LjYyNyAyNDIuMjggNDMyLjg0MyAyNDIuMjc2QzQzOS40MjUgMjQyLjI2NyA0NDYuNTA5IDIzMS42MjcgNDQ5Ljc5MSAyMTYuODIzTDQ1MS4wOTUgMjEwLjk0M0w0NTMuNjc4IDIxMy44NjhDNDY3Ljg0NiAyMjkuOTIgNDc4Ljk3NCAyNTEuODExIDQ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jc0OSAyNjcuOTQ4IDI2NS43MzYgMjYzLjg3NEMyNjEuNjAxIDI2MS43NzIgMjUyLjgwNyAyNjAuOTM4IDI0OC41NTIgMjYyLjI0NFpNMjY2LjM2NCAyNzYuMTcyQzI2OC43MTQgMjcyLjgzNCAyNjcuNjg2IDI2OS4yMjUgMjYzLjY5IDI2Ni43ODVDMjU2LjA4IDI2Mi4xMzggMjQ0LjU3MSAyNjUuOTgzIDI0NC41NzEgMjczLjE3M0MyNDQuNTcxIDI3Ni43NTIgMjUwLjU3MiAyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",
684
+ blockchains: supported$1.evm
685
+ };}
686
+
687
+ static __initStatic2() {this.isAvailable = async()=>{
688
+ return(
689
+ _optionalChain$6([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isUniswapWallet])
690
+ )
691
+ };}
692
+ } Uniswap.__initStatic(); Uniswap.__initStatic2();
693
+
694
+ 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; }
678
695
  class TokenPocket extends WindowEthereum {
679
696
 
680
697
  static __initStatic() {this.info = {
@@ -685,12 +702,12 @@ class TokenPocket extends WindowEthereum {
685
702
 
686
703
  static __initStatic2() {this.isAvailable = async()=>{
687
704
  return (
688
- _optionalChain$7([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
705
+ _optionalChain$5([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
689
706
  )
690
707
  };}
691
708
  } TokenPocket.__initStatic(); TokenPocket.__initStatic2();
692
709
 
693
- 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; }
710
+ 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; }
694
711
  class TrustEVM extends WindowEthereum {
695
712
 
696
713
  static __initStatic() {this.info = {
@@ -702,7 +719,7 @@ class TrustEVM extends WindowEthereum {
702
719
 
703
720
  static __initStatic2() {this.isAvailable = async()=>{
704
721
  return (
705
- (_optionalChain$6([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$6([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
722
+ (_optionalChain$4([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$4([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
706
723
  Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
707
724
  )
708
725
  };}
@@ -807,466 +824,10 @@ const getSmartContractWallet = async(blockchain, address)=> {
807
824
  }
808
825
  };
809
826
 
810
- 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; }
811
-
812
- const sendTransaction$2 = async ({ transaction, wallet })=> {
813
- transaction = new Transaction(transaction);
814
- if((await wallet.connectedTo(transaction.blockchain)) == false) {
815
- throw({ code: 'WRONG_NETWORK' })
816
- }
817
- await transaction.prepare({ wallet });
818
- const smartContractWallet = await getSmartContractWallet(transaction.blockchain, transaction.from);
819
- let transactionCount = await wallet.transactionCount({ blockchain: transaction.blockchain, address: transaction.from });
820
- transaction.nonce = transactionCount;
821
- await submit$2({ transaction, wallet }).then((tx)=>{
822
- if (tx) {
823
- let blockchain = Blockchains.findByName(transaction.blockchain);
824
- transaction.id = tx;
825
- transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
826
- if (transaction.sent) transaction.sent(transaction);
827
- retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet }).then((sentTransaction)=>{
828
- transaction.id = sentTransaction.hash || transaction.id;
829
- transaction.url = blockchain.explorerUrlFor({ transaction });
830
- transaction.nonce = sentTransaction.nonce || transactionCount;
831
- retrieveConfirmedTransaction$2(sentTransaction).then(()=>{
832
- transaction._succeeded = true;
833
- if (transaction.succeeded) transaction.succeeded(transaction);
834
- }).catch((error)=>{
835
- if(error && error.code && error.code == 'TRANSACTION_REPLACED') {
836
- if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 1) {
837
- transaction.id = error.replacement.hash;
838
- transaction._succeeded = true;
839
- if (transaction.succeeded) transaction.succeeded(transaction);
840
- } else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
841
- transaction.id = error.replacement.hash;
842
- transaction._failed = true;
843
- if(transaction.failed) transaction.failed(transaction, error);
844
- }
845
- } else {
846
- transaction._failed = true;
847
- if(transaction.failed) transaction.failed(transaction, error);
848
- }
849
- });
850
- });
851
- } else {
852
- throw('Submitting transaction failed!')
853
- }
854
- });
855
- return transaction
856
- };
857
-
858
- const retrieveConfirmedTransaction$2 = (sentTransaction)=>{
859
- return new Promise((resolve, reject)=>{
860
- try {
861
-
862
- sentTransaction.wait(1).then(resolve).catch((error)=>{
863
- if(
864
- (error && _optionalChain$5([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
865
- (error && error.toString().match('undefined'))
866
- ) {
867
- setTimeout(()=>{
868
- retrieveConfirmedTransaction$2(sentTransaction)
869
- .then(resolve)
870
- .catch(reject);
871
- }, 500);
872
- } else {
873
- reject(error);
874
- }
875
- });
876
- } catch (error) {
877
- if(
878
- (error && _optionalChain$5([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
879
- (error && error.toString().match('undefined'))
880
- ) {
881
- setTimeout(()=>{
882
- retrieveConfirmedTransaction$2(sentTransaction)
883
- .then(resolve)
884
- .catch(reject);
885
- }, 500);
886
- } else {
887
- reject(error);
888
- }
889
- }
890
- })
891
- };
892
-
893
- const retrieveTransaction$1 = async ({ blockchain, tx, smartContractWallet })=>{
894
- const provider = await getProvider(blockchain);
895
- let retrieve = async()=>{
896
- try {
897
- if(smartContractWallet && smartContractWallet.retrieveTransaction) {
898
- return await smartContractWallet.retrieveTransaction({ blockchain, tx })
899
- } else {
900
- return await provider.getTransaction(tx)
901
- }
902
- } catch (e) {}
903
- };
904
-
905
- let sentTransaction;
906
- sentTransaction = await retrieve();
907
- while (!sentTransaction) {
908
- await (new Promise((resolve)=>setTimeout(resolve, 3000)));
909
- sentTransaction = await retrieve();
910
- }
911
- return sentTransaction
912
- };
913
-
914
- const submit$2 = ({ transaction, wallet }) => {
915
- if(transaction.method) {
916
- return submitContractInteraction$2({ transaction, wallet })
917
- } else {
918
- return submitSimpleTransfer$2({ transaction, wallet })
919
- }
920
- };
921
-
922
- const submitContractInteraction$2 = async ({ transaction, wallet })=>{
923
- const provider = await getProvider(transaction.blockchain);
924
- let gasPrice = await provider.getGasPrice();
925
- if(_optionalChain$5([wallet, 'access', _7 => _7.session, 'optionalAccess', _8 => _8.peerMeta, 'optionalAccess', _9 => _9.name]) === 'Uniswap Wallet') {
926
- gasPrice = undefined;
927
- } else {
928
- gasPrice = gasPrice.toHexString();
929
- }
930
- let gas;
931
- try {
932
- gas = await estimate(transaction);
933
- gas = gas.add(gas.div(10));
934
- } catch (e2) {}
935
- const data = await transaction.getData();
936
- const value = transaction.value ? ethers.utils.hexlify(ethers.BigNumber.from(transaction.value)) : undefined;
937
- const nonce = ethers.utils.hexlify(transaction.nonce);
938
- return wallet.connector.sendTransaction({
939
- from: transaction.from,
940
- to: transaction.to,
941
- value,
942
- data,
943
- gas: _optionalChain$5([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
944
- gasPrice,
945
- nonce,
946
- })
947
- };
948
-
949
- const submitSimpleTransfer$2 = async ({ transaction, wallet })=>{
950
- const provider = await getProvider(transaction.blockchain);
951
- let gasPrice = await provider.getGasPrice();
952
- if(_optionalChain$5([wallet, 'access', _12 => _12.session, 'optionalAccess', _13 => _13.peerMeta, 'optionalAccess', _14 => _14.name]) === 'Uniswap Wallet') {
953
- gasPrice = undefined;
954
- } else {
955
- gasPrice = gasPrice.toHexString();
956
- }
957
- let gas;
958
- try {
959
- gas = await estimate(transaction);
960
- gas = gas.add(gas.div(10));
961
- } catch (e3) {}
962
- const value = ethers.utils.hexlify(ethers.BigNumber.from(transaction.value));
963
- const nonce = ethers.utils.hexlify(transaction.nonce);
964
- return wallet.connector.sendTransaction({
965
- from: transaction.from,
966
- to: transaction.to,
967
- value,
968
- data: '0x',
969
- gas: _optionalChain$5([gas, 'optionalAccess', _15 => _15.toHexString, 'call', _16 => _16()]),
970
- gasPrice,
971
- nonce,
972
- })
973
- };
974
-
975
- 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; }
976
-
977
- const KEY$1 = '_DePayWeb3WalletsConnectedWalletConnectV1Instance';
978
-
979
- let currentPlainInstance;
980
-
981
- const getPlainInstance = ()=>{
982
- if(currentPlainInstance) { return currentPlainInstance }
983
- currentPlainInstance = getWalletConnectInstance(()=>{});
984
- return currentPlainInstance
985
- };
986
-
987
- const isConnected = ()=>{
988
- return new Promise(async(resolve, reject)=>{
989
-
990
- setTimeout(()=>{
991
- delete localStorage['walletconnect'];
992
- resolve(false);
993
- }, 5000);
994
-
995
- if(!localStorage['walletconnect'] || JSON.parse(localStorage['walletconnect']).handshakeTopic.length == 0) {
996
- delete localStorage['walletconnect'];
997
- return resolve(false)
998
- }
999
-
1000
- let connector = getPlainInstance();
1001
- let accounts;
1002
-
1003
- try {
1004
- let blockNumber = await connector.sendCustomRequest({ method: 'eth_blockNumber' });
1005
- if(blockNumber) {
1006
- accounts = await connector.sendCustomRequest({ method: 'eth_accounts' });
1007
- } else {
1008
- delete localStorage['walletconnect'];
1009
- }
1010
- } catch (error) {
1011
- delete localStorage['walletconnect'];
1012
- resolve(false);
1013
- }
1014
-
1015
- return resolve(accounts && accounts.length)
1016
- })
1017
- };
1018
-
1019
- const getConnectedInstance$2 = async()=>{
1020
- if(window[KEY$1]) { return window[KEY$1] }
1021
- if(await isConnected()) { return new WalletConnectV1() }
1022
- };
1023
-
1024
- const setConnectedInstance$1 = (value)=>{
1025
- window[KEY$1] = value;
1026
- };
1027
-
1028
- const getWalletConnectInstance = (connect)=>{
1029
- return new WalletConnectClient({
1030
- bridge: "https://walletconnect.depay.com",
1031
- qrcodeModal: {
1032
- open: async(uri)=>connect({ uri }),
1033
- close: ()=>{},
1034
- }
1035
- })
1036
- };
1037
-
1038
- class WalletConnectV1 {
1039
-
1040
- static __initStatic() {this.info = {
1041
- name: 'WalletConnect',
1042
- logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz48IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMjUuNC4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAtLT48c3ZnIHZlcnNpb249JzEuMScgaWQ9J0xheWVyXzEnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycgeG1sbnM6eGxpbms9J2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnIHg9JzBweCcgeT0nMHB4JyB2aWV3Qm94PScwIDAgNTAwIDUwMCcgc3R5bGU9J2VuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTAwIDUwMDsnIHhtbDpzcGFjZT0ncHJlc2VydmUnPjxzdHlsZSB0eXBlPSd0ZXh0L2Nzcyc+IC5zdDB7ZmlsbDojNTk5MUNEO30KPC9zdHlsZT48ZyBpZD0nUGFnZS0xJz48ZyBpZD0nd2FsbGV0Y29ubmVjdC1sb2dvLWFsdCc+PHBhdGggaWQ9J1dhbGxldENvbm5lY3QnIGNsYXNzPSdzdDAnIGQ9J00xMDIuNywxNjJjODEuNS03OS44LDIxMy42LTc5LjgsMjk1LjEsMGw5LjgsOS42YzQuMSw0LDQuMSwxMC41LDAsMTQuNEwzNzQsMjE4LjkgYy0yLDItNS4zLDItNy40LDBsLTEzLjUtMTMuMmMtNTYuOC01NS43LTE0OS01NS43LTIwNS44LDBsLTE0LjUsMTQuMWMtMiwyLTUuMywyLTcuNCwwTDkxLjksMTg3Yy00LjEtNC00LjEtMTAuNSwwLTE0LjQgTDEwMi43LDE2MnogTTQ2Ny4xLDIyOS45bDI5LjksMjkuMmM0LjEsNCw0LjEsMTAuNSwwLDE0LjRMMzYyLjMsNDA1LjRjLTQuMSw0LTEwLjcsNC0xNC44LDBjMCwwLDAsMCwwLDBMMjUyLDMxMS45IGMtMS0xLTIuNy0xLTMuNywwaDBsLTk1LjUsOTMuNWMtNC4xLDQtMTAuNyw0LTE0LjgsMGMwLDAsMCwwLDAsMEwzLjQsMjczLjZjLTQuMS00LTQuMS0xMC41LDAtMTQuNGwyOS45LTI5LjIgYzQuMS00LDEwLjctNCwxNC44LDBsOTUuNSw5My41YzEsMSwyLjcsMSwzLjcsMGMwLDAsMCwwLDAsMGw5NS41LTkzLjVjNC4xLTQsMTAuNy00LDE0LjgsMGMwLDAsMCwwLDAsMGw5NS41LDkzLjUgYzEsMSwyLjcsMSwzLjcsMGw5NS41LTkzLjVDNDU2LjQsMjI1LjksNDYzLDIyNS45LDQ2Ny4xLDIyOS45eicvPjwvZz48L2c+PC9zdmc+Cg==",
1043
- blockchains: supported$1.evm
1044
- };}
1045
-
1046
- static __initStatic2() {this.isAvailable = async()=>{
1047
- return (await getConnectedInstance$2()) != undefined
1048
- };}
1049
-
1050
- constructor() {
1051
- this.name = (localStorage[KEY$1+'_name'] && localStorage[KEY$1+'_name'] != undefined) ? localStorage[KEY$1+'_name'] : this.constructor.info.name;
1052
- this.logo = (localStorage[KEY$1+'_logo'] && localStorage[KEY$1+'_logo'] != undefined) ? localStorage[KEY$1+'_logo'] : this.constructor.info.logo;
1053
- this.blockchains = this.constructor.info.blockchains;
1054
- this.sendTransaction = (transaction)=>{
1055
- return sendTransaction$2({
1056
- wallet: this,
1057
- transaction
1058
- })
1059
- };
1060
- }
1061
-
1062
- disconnect() {
1063
- setConnectedInstance$1(undefined);
1064
- localStorage[KEY$1+'_name'] = undefined;
1065
- localStorage[KEY$1+'_logo'] = undefined;
1066
- currentPlainInstance = undefined;
1067
- this.session = undefined;
1068
- }
1069
-
1070
- newWalletConnectInstance(connect) {
1071
- let instance = getWalletConnectInstance(connect);
1072
-
1073
- instance.on("disconnect", (error, payload) => {
1074
- this.disconnect();
1075
- if (error) { throw error }
1076
- });
1077
-
1078
- instance.on("modal_closed", ()=>{
1079
- setConnectedInstance$1(undefined);
1080
- this.connector = undefined;
1081
- this.session = undefined;
1082
- });
1083
-
1084
- return instance
1085
- }
1086
-
1087
- async account() {
1088
- if(!this.connector){ this.connector = getPlainInstance(); }
1089
- let accounts;
1090
- try{ accounts = await this.connector.sendCustomRequest({ method: 'eth_accounts' }); } catch (e) {}
1091
- if(accounts && accounts.length) { return ethers.utils.getAddress(accounts[0]) }
1092
- }
1093
-
1094
- async connect(options) {
1095
- let connect = (options && options.connect) ? options.connect : ({uri})=>{};
1096
- try {
1097
-
1098
- this.connector = WalletConnectV1.instance;
1099
-
1100
- if(this.connector == undefined){
1101
- this.connector = this.newWalletConnectInstance(connect);
1102
- }
1103
-
1104
- if(options && options.reconnect) {
1105
- if(this.connector) {
1106
- try{ await this.connector.killSession(); } catch (e2) {}
1107
- this.disconnect();
1108
- }
1109
- }
1110
-
1111
- if((await isConnected())) {
1112
- return await this.account()
1113
- } else {
1114
-
1115
- let session = await this.connector.connect();
1116
- this.session = session;
1117
-
1118
- if(_optionalChain$4([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
1119
- if(_optionalChain$4([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
1120
-
1121
- if(session.accounts instanceof Array && session.accounts.length) {
1122
- setConnectedInstance$1(this);
1123
- return ethers.utils.getAddress(session.accounts[0])
1124
- } else {
1125
- return
1126
- }
1127
- }
1128
-
1129
- } catch (error) {
1130
- console.log('WALLETCONNECT ERROR', error);
1131
- return undefined
1132
- }
1133
- }
1134
-
1135
- async connectedTo(input) {
1136
- let chainId = await this.connector.sendCustomRequest({ method: 'eth_chainId' });
1137
- const blockchain = Blockchains.findById(chainId);
1138
- if(!blockchain) { return false }
1139
- if(input) {
1140
- return input === blockchain.name
1141
- } else {
1142
- return blockchain.name
1143
- }
1144
- }
1145
-
1146
- switchTo(blockchainName) {
1147
- return new Promise((resolve, reject)=>{
1148
- let resolved, rejected;
1149
- const blockchain = Blockchains.findByName(blockchainName);
1150
- setTimeout(async()=>{
1151
- if(!(await this.connectedTo(blockchainName)) && !resolved && !rejected){
1152
- reject({ code: 'NOT_SUPPORTED' });
1153
- } else {
1154
- resolve();
1155
- }
1156
- }, 3000);
1157
- this.connector.sendCustomRequest({
1158
- method: 'wallet_switchEthereumChain',
1159
- params: [{ chainId: blockchain.id }],
1160
- }).then(()=>{
1161
- resolved = true;
1162
- resolve();
1163
- }).catch((error)=> {
1164
- if(error && typeof error.message == 'string' && error.message.match('addEthereumChain')){ // chain not yet added
1165
- this.addNetwork(blockchainName)
1166
- .then(()=>this.switchTo(blockchainName).then(()=>{
1167
- resolved = true;
1168
- resolve();
1169
- }))
1170
- .catch(()=>{
1171
- rejected = true;
1172
- reject({ code: 'NOT_SUPPORTED' });
1173
- });
1174
- } else {
1175
- rejected = true;
1176
- reject({ code: 'NOT_SUPPORTED' });
1177
- }
1178
- });
1179
- })
1180
- }
1181
-
1182
- addNetwork(blockchainName) {
1183
- return new Promise((resolve, reject)=>{
1184
- const blockchain = Blockchains.findByName(blockchainName);
1185
- this.connector.sendCustomRequest({
1186
- method: 'wallet_addEthereumChain',
1187
- params: [{
1188
- chainId: blockchain.id,
1189
- chainName: blockchain.fullName,
1190
- nativeCurrency: {
1191
- name: blockchain.currency.name,
1192
- symbol: blockchain.currency.symbol,
1193
- decimals: blockchain.currency.decimals
1194
- },
1195
- rpcUrls: [blockchain.rpc],
1196
- blockExplorerUrls: [blockchain.explorer],
1197
- iconUrls: [blockchain.logo]
1198
- }],
1199
- }).then(resolve).catch(reject);
1200
- })
1201
- }
1202
-
1203
- on(event, callback) {
1204
- let internalCallback;
1205
- switch (event) {
1206
- case 'account':
1207
- internalCallback = (error, payload) => {
1208
- if(payload && payload.params && payload.params[0].accounts && payload.params[0].accounts instanceof Array) {
1209
- const accounts = payload.params[0].accounts.map((account)=>ethers.utils.getAddress(account));
1210
- callback(accounts[0]);
1211
- }
1212
- };
1213
- this.connector.on("session_update", internalCallback);
1214
- break
1215
- }
1216
- return internalCallback
1217
- }
1218
-
1219
- off(event, callback) {
1220
- switch (event) {
1221
- case 'account':
1222
- this.connector.off("session_update");
1223
- break
1224
- }
1225
- }
1226
-
1227
- async transactionCount({ blockchain, address }) {
1228
- const smartContractWallet = await getSmartContractWallet(blockchain, address);
1229
- if(smartContractWallet) {
1230
- return await smartContractWallet.transactionCount()
1231
- } else {
1232
- return await request({ blockchain, method: 'transactionCount', address })
1233
- }
1234
- }
1235
-
1236
- async sign(message) {
1237
- if(typeof message === 'object') {
1238
- let account = await this.account();
1239
- if((await this.connectedTo(Blockchains.findByNetworkId(message.domain.chainId).name)) === false) {
1240
- throw({ code: 'WRONG_NETWORK' })
1241
- }
1242
- let signature = await this.connector.sendCustomRequest({
1243
- jsonrpc: '2.0',
1244
- method: 'eth_signTypedData_v4',
1245
- params: [account, JSON.stringify(message)],
1246
- });
1247
- return signature
1248
- } else if (typeof message === 'string') {
1249
- let blockchain = await this.connectedTo();
1250
- let address = await this.account();
1251
- const smartContractWallet = await getSmartContractWallet(blockchain, address);
1252
- if(smartContractWallet){ throw({ message: 'Smart contract wallets are not supported for signing!', code: "SMART_CONTRACT_WALLET_NOT_SUPPORTED" }) }
1253
- var params = [ethers.utils.toUtf8Bytes(message), address];
1254
- let signature = await this.connector.signPersonalMessage(params);
1255
- return signature
1256
- }
1257
- }
1258
- } WalletConnectV1.__initStatic(); WalletConnectV1.__initStatic2();
1259
-
1260
- WalletConnectV1.getConnectedInstance = getConnectedInstance$2;
1261
- WalletConnectV1.setConnectedInstance = setConnectedInstance$1;
1262
-
1263
827
  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; }
1264
828
 
1265
829
  const sendTransaction$1 = async ({ transaction, wallet })=> {
1266
830
  transaction = new Transaction(transaction);
1267
- if((await wallet.connectedTo(transaction.blockchain)) == false) {
1268
- throw({ code: 'WRONG_NETWORK' })
1269
- }
1270
831
  await transaction.prepare({ wallet });
1271
832
  let transactionCount = await request({ blockchain: transaction.blockchain, method: 'transactionCount', address: transaction.from });
1272
833
  transaction.nonce = transactionCount;
@@ -1402,8 +963,9 @@ const submitContractInteraction$1 = async ({ transaction, wallet })=>{
1402
963
  value: transaction.value ? ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
1403
964
  data: await transaction.getData(),
1404
965
  gas: _optionalChain$3([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
966
+ gasLimit: _optionalChain$3([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
1405
967
  gasPrice: gasPrice.toHexString(),
1406
- nonce: transaction.nonce,
968
+ nonce: ethers.utils.hexlify(transaction.nonce),
1407
969
  }]
1408
970
  }
1409
971
  }).catch((e)=>{console.log('ERROR', e);})
@@ -1427,9 +989,11 @@ const submitSimpleTransfer$1 = async ({ transaction, wallet })=>{
1427
989
  from: transaction.from,
1428
990
  to: transaction.to,
1429
991
  value: transaction.value ? ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
1430
- gas: _optionalChain$3([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
1431
- gasPrice: gasPrice.toHexString(),
1432
- nonce: transaction.nonce
992
+ data: '0x0',
993
+ gas: _optionalChain$3([gas, 'optionalAccess', _14 => _14.toHexString, 'call', _15 => _15()]),
994
+ gasLimit: _optionalChain$3([gas, 'optionalAccess', _16 => _16.toHexString, 'call', _17 => _17()]),
995
+ gasPrice: _optionalChain$3([gasPrice, 'optionalAccess', _18 => _18.toHexString, 'call', _19 => _19()]),
996
+ nonce: ethers.utils.hexlify(transaction.nonce)
1433
997
  }]
1434
998
  }
1435
999
  }).catch((e)=>{console.log('ERROR', e);})
@@ -1439,88 +1003,6 @@ function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[
1439
1003
 
1440
1004
  const KEY = 'depay:wallets:wc2';
1441
1005
 
1442
- // configurations for wallets that require special handling
1443
- const CONFIGURATIONS = {
1444
-
1445
- "MetaMask": {
1446
- methods: [
1447
- "eth_sendTransaction",
1448
- "personal_sign",
1449
- "eth_signTypedData",
1450
- "eth_signTypedData_v4",
1451
- "wallet_switchEthereumChain"
1452
- ],
1453
- },
1454
-
1455
- "BitGet (BitKeep)": {
1456
- methods: [
1457
- "eth_sendTransaction",
1458
- "personal_sign",
1459
- "eth_signTypedData",
1460
- "eth_signTypedData_v4",
1461
- ],
1462
- requiredNamespaces: {
1463
- eip155: {
1464
- chains: ['ethereum', 'bsc', 'polygon', 'arbitrum', 'base'].map((blockchainName)=>`eip155:${Blockchains[blockchainName].networkId}`)
1465
- }
1466
- },
1467
- optionalNamespaces: {},
1468
- },
1469
-
1470
- "BitGet": {
1471
- methods: [
1472
- "eth_sendTransaction",
1473
- "personal_sign",
1474
- "eth_signTypedData",
1475
- "eth_signTypedData_v4",
1476
- ],
1477
- requiredNamespaces: {
1478
- eip155: {
1479
- chains: ['ethereum', 'bsc', 'polygon', 'arbitrum', 'base'].map((blockchainName)=>`eip155:${Blockchains[blockchainName].networkId}`)
1480
- }
1481
- },
1482
- optionalNamespaces: {},
1483
- },
1484
-
1485
- "Uniswap Wallet": {
1486
- methods: [
1487
- "eth_sendTransaction",
1488
- "personal_sign",
1489
- "eth_signTypedData",
1490
- "eth_signTypedData_v4",
1491
- ],
1492
- requiredNamespaces: {
1493
- eip155: {
1494
- chains: ['ethereum', 'polygon', 'arbitrum', 'optimism', 'base'].map((blockchainName)=>`eip155:${Blockchains[blockchainName].networkId}`)
1495
- }
1496
- },
1497
- optionalNamespaces: {},
1498
- },
1499
-
1500
- "Ledger Live": {
1501
- methods: [
1502
- "eth_sendTransaction",
1503
- "personal_sign",
1504
- "eth_signTypedData",
1505
- "eth_signTypedData_v4",
1506
- ],
1507
- requiredNamespaces: {},
1508
- optionalNamespaces: {
1509
- eip155: {
1510
- chains: Blockchains.all.map((blockchain)=>`eip155:${blockchain.networkId}`)
1511
- }
1512
- },
1513
- },
1514
-
1515
- "Enjin Wallet": {
1516
- methods: [
1517
- "eth_sendTransaction",
1518
- "personal_sign",
1519
- "eth_signTypedData",
1520
- ]
1521
- },
1522
- };
1523
-
1524
1006
  const DEFAULT_CONFIGURATION = {
1525
1007
  events: ['accountsChanged'],
1526
1008
  methods: [
@@ -1554,31 +1036,23 @@ const getLastSession = async(walletName)=>{
1554
1036
  };
1555
1037
 
1556
1038
  const getWalletConnectV2Config = (walletName)=>{
1557
- const methods = _optionalChain$2([CONFIGURATIONS, 'access', _ => _[walletName], 'optionalAccess', _2 => _2.methods]) || DEFAULT_CONFIGURATION.methods;
1558
- const events = _optionalChain$2([CONFIGURATIONS, 'access', _3 => _3[walletName], 'optionalAccess', _4 => _4.events]) || DEFAULT_CONFIGURATION.events;
1039
+ const methods = DEFAULT_CONFIGURATION.methods;
1040
+ const events = DEFAULT_CONFIGURATION.events;
1559
1041
 
1560
1042
  let requiredNamespaces = {};
1561
- if(_optionalChain$2([CONFIGURATIONS, 'access', _5 => _5[walletName], 'optionalAccess', _6 => _6.requiredNamespaces])) {
1562
- requiredNamespaces = CONFIGURATIONS[walletName].requiredNamespaces;
1563
- } else {
1564
- requiredNamespaces['eip155'] = {
1565
- chains: [`eip155:1`],
1566
- };
1567
- }
1043
+ requiredNamespaces['eip155'] = {
1044
+ chains: [`eip155:1`],
1045
+ };
1568
1046
  if(requiredNamespaces['eip155']) {
1569
1047
  requiredNamespaces['eip155'].methods = methods;
1570
1048
  requiredNamespaces['eip155'].events = events;
1571
1049
  }
1572
1050
 
1573
1051
  let optionalNamespaces = {};
1574
- if(_optionalChain$2([CONFIGURATIONS, 'access', _7 => _7[walletName], 'optionalAccess', _8 => _8.optionalNamespaces])) {
1575
- optionalNamespaces = CONFIGURATIONS[walletName].optionalNamespaces;
1576
- } else {
1577
- optionalNamespaces['eip155'] = {
1578
- chains: supported$1.evm.map((blockchain)=>`${Blockchains[blockchain].namespace}:${Blockchains[blockchain].networkId}`),
1579
- };
1580
- }
1581
- if(_optionalChain$2([optionalNamespaces, 'optionalAccess', _9 => _9.eip155]) && _optionalChain$2([optionalNamespaces, 'optionalAccess', _10 => _10.eip155, 'optionalAccess', _11 => _11.chains, 'optionalAccess', _12 => _12.length])) {
1052
+ optionalNamespaces['eip155'] = {
1053
+ chains: supported$1.evm.map((blockchain)=>`${Blockchains[blockchain].namespace}:${Blockchains[blockchain].networkId}`),
1054
+ };
1055
+ if(_optionalChain$2([optionalNamespaces, 'optionalAccess', _ => _.eip155]) && _optionalChain$2([optionalNamespaces, 'optionalAccess', _2 => _2.eip155, 'optionalAccess', _3 => _3.chains, 'optionalAccess', _4 => _4.length])) {
1582
1056
  optionalNamespaces['eip155'].methods = methods;
1583
1057
  optionalNamespaces['eip155'].events = events;
1584
1058
  }
@@ -1593,9 +1067,9 @@ const getSignClient = ()=>{
1593
1067
  projectId: localStorage[KEY+":projectId"],
1594
1068
  metadata: {
1595
1069
  name: document.title || 'dApp',
1596
- 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',
1070
+ description: _optionalChain$2([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('meta[name="description"]'), 'optionalAccess', _7 => _7.getAttribute, 'call', _8 => _8('content')]) || document.title || 'dApp',
1597
1071
  url: location.href,
1598
- 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`]
1072
+ icons: [_optionalChain$2([document, 'access', _9 => _9.querySelector, 'call', _10 => _10("link[rel~='icon'], link[rel~='shortcut icon']"), 'optionalAccess', _11 => _11.href]) || `${location.origin}/favicon.ico`]
1599
1073
  }
1600
1074
  });
1601
1075
  resolve(signClient);
@@ -1613,7 +1087,7 @@ class WalletConnectV2 {
1613
1087
  };}
1614
1088
 
1615
1089
  static __initStatic2() {this.isAvailable = async(options)=>{
1616
- return !! await getLastSession(_optionalChain$2([options, 'optionalAccess', _21 => _21.walletName]))
1090
+ return !! await getLastSession(_optionalChain$2([options, 'optionalAccess', _13 => _13.walletName]))
1617
1091
  };}
1618
1092
 
1619
1093
  constructor() {
@@ -1628,17 +1102,17 @@ class WalletConnectV2 {
1628
1102
  }
1629
1103
 
1630
1104
  async account() {
1631
- if(_optionalChain$2([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.namespaces, 'optionalAccess', _24 => _24.eip155, 'optionalAccess', _25 => _25.accounts, 'optionalAccess', _26 => _26.length])) {
1105
+ if(_optionalChain$2([this, 'access', _14 => _14.session, 'optionalAccess', _15 => _15.namespaces, 'optionalAccess', _16 => _16.eip155, 'optionalAccess', _17 => _17.accounts, 'optionalAccess', _18 => _18.length])) {
1632
1106
  return this.session.namespaces.eip155.accounts[0].split(':')[2]
1633
1107
  }
1634
1108
  }
1635
1109
 
1636
1110
  async setSessionBlockchains() {
1637
- if(!this.session || (!_optionalChain$2([this, 'access', _27 => _27.session, 'optionalAccess', _28 => _28.namespaces, 'optionalAccess', _29 => _29.eip155]) && !_optionalChain$2([this, 'access', _30 => _30.session, 'optionalAccess', _31 => _31.optionalNamespaces, 'optionalAccess', _32 => _32.eip155]))) { return }
1111
+ if(!this.session || (!_optionalChain$2([this, 'access', _19 => _19.session, 'optionalAccess', _20 => _20.namespaces, 'optionalAccess', _21 => _21.eip155]) && !_optionalChain$2([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.optionalNamespaces, 'optionalAccess', _24 => _24.eip155]))) { return }
1638
1112
  if(this.session.namespaces.eip155.chains) {
1639
- this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$2([Blockchains, 'access', _33 => _33.findByNetworkId, 'call', _34 => _34(chainIdentifier.split(':')[1]), 'optionalAccess', _35 => _35.name])).filter(Boolean);
1113
+ this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$2([Blockchains, 'access', _25 => _25.findByNetworkId, 'call', _26 => _26(chainIdentifier.split(':')[1]), 'optionalAccess', _27 => _27.name])).filter(Boolean);
1640
1114
  } else if(this.session.namespaces.eip155.accounts) {
1641
- this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$2([Blockchains, 'access', _36 => _36.findByNetworkId, 'call', _37 => _37(accountIdentifier.split(':')[1]), 'optionalAccess', _38 => _38.name])).filter(Boolean);
1115
+ this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$2([Blockchains, 'access', _28 => _28.findByNetworkId, 'call', _29 => _29(accountIdentifier.split(':')[1]), 'optionalAccess', _30 => _30.name])).filter(Boolean);
1642
1116
  }
1643
1117
  }
1644
1118
 
@@ -1648,13 +1122,13 @@ class WalletConnectV2 {
1648
1122
 
1649
1123
  try {
1650
1124
 
1651
- this.walletName = _optionalChain$2([options, 'optionalAccess', _39 => _39.name]);
1125
+ this.walletName = _optionalChain$2([options, 'optionalAccess', _31 => _31.name]);
1652
1126
 
1653
1127
  // delete localStorage[`wc@2:client:0.3//session`] // DELETE WC SESSIONS
1654
1128
  this.signClient = await getSignClient();
1655
1129
 
1656
1130
  this.signClient.on("session_delete", (session)=> {
1657
- if(_optionalChain$2([session, 'optionalAccess', _40 => _40.topic]) === _optionalChain$2([this, 'access', _41 => _41.session, 'optionalAccess', _42 => _42.topic])) {
1131
+ if(_optionalChain$2([session, 'optionalAccess', _32 => _32.topic]) === _optionalChain$2([this, 'access', _33 => _33.session, 'optionalAccess', _34 => _34.topic])) {
1658
1132
  localStorage[KEY+':name'] = undefined;
1659
1133
  localStorage[KEY+':logo'] = undefined;
1660
1134
  this.signClient = undefined;
@@ -1663,14 +1137,14 @@ class WalletConnectV2 {
1663
1137
  });
1664
1138
 
1665
1139
  this.signClient.on("session_update", async(session)=> {
1666
- if(_optionalChain$2([session, 'optionalAccess', _43 => _43.topic]) === _optionalChain$2([this, 'access', _44 => _44.session, 'optionalAccess', _45 => _45.topic])) {
1140
+ if(_optionalChain$2([session, 'optionalAccess', _35 => _35.topic]) === _optionalChain$2([this, 'access', _36 => _36.session, 'optionalAccess', _37 => _37.topic])) {
1667
1141
  this.session = this.signClient.session.get(session.topic);
1668
1142
  await this.setSessionBlockchains();
1669
1143
  }
1670
1144
  });
1671
1145
 
1672
1146
  this.signClient.on("session_event", (event)=> {
1673
- if(_optionalChain$2([event, 'optionalAccess', _46 => _46.topic]) === _optionalChain$2([this, 'access', _47 => _47.session, 'optionalAccess', _48 => _48.topic])) {}
1147
+ if(_optionalChain$2([event, 'optionalAccess', _38 => _38.topic]) === _optionalChain$2([this, 'access', _39 => _39.session, 'optionalAccess', _40 => _40.topic])) {}
1674
1148
  });
1675
1149
 
1676
1150
  const connectWallet = async()=>{
@@ -1681,24 +1155,24 @@ class WalletConnectV2 {
1681
1155
  await new Promise(resolve=>setTimeout(resolve, 500)); // to prevent race condition within WalletConnect
1682
1156
  };
1683
1157
 
1684
- const lastSession = _optionalChain$2([this, 'optionalAccess', _49 => _49.walletName, 'optionalAccess', _50 => _50.length]) ? await getLastSession(this.walletName) : undefined;
1158
+ const lastSession = _optionalChain$2([this, 'optionalAccess', _41 => _41.walletName, 'optionalAccess', _42 => _42.length]) ? await getLastSession(this.walletName) : undefined;
1685
1159
  if(lastSession) {
1686
1160
  this.session = lastSession;
1687
1161
  } else {
1688
1162
  await connectWallet();
1689
1163
  }
1690
1164
 
1691
- let meta = _optionalChain$2([this, 'access', _51 => _51.session, 'optionalAccess', _52 => _52.peer, 'optionalAccess', _53 => _53.metadata]);
1165
+ let meta = _optionalChain$2([this, 'access', _43 => _43.session, 'optionalAccess', _44 => _44.peer, 'optionalAccess', _45 => _45.metadata]);
1692
1166
  if(meta && meta.name) {
1693
1167
  this.name = meta.name;
1694
1168
  localStorage[KEY+':name'] = meta.name;
1695
- if(_optionalChain$2([meta, 'optionalAccess', _54 => _54.icons]) && meta.icons.length) {
1169
+ if(_optionalChain$2([meta, 'optionalAccess', _46 => _46.icons]) && meta.icons.length) {
1696
1170
  this.logo = meta.icons[0];
1697
1171
  localStorage[KEY+':logo'] = this.logo;
1698
1172
  }
1699
1173
  }
1700
- if(_optionalChain$2([options, 'optionalAccess', _55 => _55.name])) { localStorage[KEY+':name'] = this.name = options.name; }
1701
- if(_optionalChain$2([options, 'optionalAccess', _56 => _56.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
1174
+ if(_optionalChain$2([options, 'optionalAccess', _47 => _47.name])) { localStorage[KEY+':name'] = this.name = options.name; }
1175
+ if(_optionalChain$2([options, 'optionalAccess', _48 => _48.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
1702
1176
 
1703
1177
  await this.setSessionBlockchains();
1704
1178
 
@@ -1723,24 +1197,7 @@ class WalletConnectV2 {
1723
1197
 
1724
1198
  switchTo(blockchainName) {
1725
1199
  return new Promise((resolve, reject)=>{
1726
-
1727
- const blockchain = Blockchains[blockchainName];
1728
-
1729
- Promise.race([
1730
- this.signClient.request({
1731
- topic: this.session.topic,
1732
- chainId: this.getValidChainId(),
1733
- request:{
1734
- method: 'wallet_switchEthereumChain',
1735
- params: [{ chainId: blockchain.id }],
1736
- }
1737
- }),
1738
- new Promise((resolve, reject)=>setTimeout(()=>{
1739
- if(this.blockchains.indexOf(blockchainName) === -1) {
1740
- reject({ code: 'NOT_SUPPORTED' });
1741
- }
1742
- } , 8000))
1743
- ]).catch(reject);
1200
+ reject({ code: 'NOT_SUPPORTED' });
1744
1201
  })
1745
1202
  }
1746
1203
 
@@ -1755,7 +1212,7 @@ class WalletConnectV2 {
1755
1212
  switch (event) {
1756
1213
  case 'account':
1757
1214
  internalCallback = async(event)=> {
1758
- if(_optionalChain$2([event, 'optionalAccess', _57 => _57.topic]) === _optionalChain$2([this, 'access', _58 => _58.session, 'optionalAccess', _59 => _59.topic]) && event.params.event.name === 'accountsChanged') {
1215
+ if(_optionalChain$2([event, 'optionalAccess', _49 => _49.topic]) === _optionalChain$2([this, 'access', _50 => _50.session, 'optionalAccess', _51 => _51.topic]) && event.params.event.name === 'accountsChanged') {
1759
1216
  callback(await this.account());
1760
1217
  }
1761
1218
  };
@@ -2107,6 +1564,7 @@ var wallets = {
2107
1564
  Binance,
2108
1565
  TrustEVM,
2109
1566
  Rabby,
1567
+ Uniswap,
2110
1568
  BraveEVM,
2111
1569
  Opera,
2112
1570
  MagicEdenEVM,
@@ -2120,7 +1578,6 @@ var wallets = {
2120
1578
 
2121
1579
  // standards (not concrete wallets)
2122
1580
  WindowEthereum,
2123
- WalletConnectV1,
2124
1581
  WalletConnectV2,
2125
1582
  WalletLink
2126
1583
  };
@@ -2162,6 +1619,7 @@ const supported = [
2162
1619
  wallets.Binance,
2163
1620
  wallets.TrustEVM,
2164
1621
  wallets.Rabby,
1622
+ wallets.Uniswap,
2165
1623
  wallets.PhantomEVM,
2166
1624
  wallets.BraveEVM,
2167
1625
  wallets.OKXEvm,
@@ -2175,7 +1633,6 @@ const supported = [
2175
1633
  wallets.ExodusEVM,
2176
1634
 
2177
1635
  // standards (not concrete wallets)
2178
- wallets.WalletConnectV1,
2179
1636
  wallets.WalletConnectV2,
2180
1637
  wallets.WalletLink,
2181
1638
  wallets.WindowEthereum,