@depay/web3-wallets-evm 16.3.2 → 16.3.4
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.evm.js +120 -88
- package/dist/esm/index.js +143 -111
- package/dist/umd/index.evm.js +120 -88
- package/dist/umd/index.js +143 -111
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains);
|
|
10
10
|
|
|
11
|
-
function _optionalChain$
|
|
11
|
+
function _optionalChain$t(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; }
|
|
12
12
|
class Transaction {
|
|
13
13
|
|
|
14
14
|
constructor({
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
this.to = (to && to.match('0x')) ? ethers.ethers.utils.getAddress(to) : to;
|
|
34
34
|
|
|
35
35
|
// optional
|
|
36
|
-
this.value = _optionalChain$
|
|
36
|
+
this.value = _optionalChain$t([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
|
|
37
37
|
this.api = api;
|
|
38
38
|
this.method = method;
|
|
39
39
|
this.params = params;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
getParamType(param) {
|
|
76
|
-
if(_optionalChain$
|
|
76
|
+
if(_optionalChain$t([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
|
|
77
77
|
return `(${param.components.map((param)=>this.getParamType(param)).join(',')})`
|
|
78
78
|
} else {
|
|
79
79
|
return param.type
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
function _optionalChain$
|
|
149
|
+
function _optionalChain$s(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; }
|
|
150
150
|
|
|
151
151
|
const POLL_SPEED = 500; // 0.5 seconds
|
|
152
152
|
const MAX_POLLS = 240; // 120 seconds
|
|
@@ -167,14 +167,14 @@
|
|
|
167
167
|
|
|
168
168
|
const provider = await web3Client.getProvider(transaction.blockchain);
|
|
169
169
|
const { value } = await provider.getSignatureStatus(signature);
|
|
170
|
-
const confirmationStatus = _optionalChain$
|
|
170
|
+
const confirmationStatus = _optionalChain$s([value, 'optionalAccess', _ => _.confirmationStatus]);
|
|
171
171
|
if(confirmationStatus) {
|
|
172
172
|
const hasReachedSufficientCommitment = confirmationStatus === 'confirmed' || confirmationStatus === 'finalized';
|
|
173
173
|
if (hasReachedSufficientCommitment) {
|
|
174
174
|
if(value.err) {
|
|
175
175
|
transaction._failed = true;
|
|
176
176
|
const confirmedTransaction = await provider.getConfirmedTransaction(signature);
|
|
177
|
-
const failedReason = _optionalChain$
|
|
177
|
+
const failedReason = _optionalChain$s([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
|
|
178
178
|
if(transaction.failed) transaction.failed(transaction, failedReason);
|
|
179
179
|
} else {
|
|
180
180
|
transaction._succeeded = true;
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
supported$1.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
|
|
266
266
|
supported$1.solana = ['solana'];
|
|
267
267
|
|
|
268
|
-
function _optionalChain$
|
|
268
|
+
function _optionalChain$r(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; }
|
|
269
269
|
class WindowSolana {
|
|
270
270
|
|
|
271
271
|
static __initStatic() {this.info = {
|
|
@@ -276,13 +276,13 @@
|
|
|
276
276
|
|
|
277
277
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
278
278
|
return (
|
|
279
|
-
_optionalChain$
|
|
279
|
+
_optionalChain$r([window, 'optionalAccess', _5 => _5.solana]) &&
|
|
280
280
|
// not Phantom
|
|
281
281
|
!(window.phantom && !window.glow && !window.solana.isGlow && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
|
|
282
282
|
// not Coin98
|
|
283
283
|
!window.coin98 &&
|
|
284
284
|
// not BitKeep
|
|
285
|
-
!(_optionalChain$
|
|
285
|
+
!(_optionalChain$r([window, 'optionalAccess', _6 => _6.solana]) && _optionalChain$r([window, 'optionalAccess', _7 => _7.solana, 'access', _8 => _8.isBitKeep])) &&
|
|
286
286
|
// not Glow
|
|
287
287
|
!window.solana.isGlow &&
|
|
288
288
|
// not trust
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
let internalCallback;
|
|
334
334
|
switch (event) {
|
|
335
335
|
case 'account':
|
|
336
|
-
internalCallback = (publicKey) => callback(_optionalChain$
|
|
336
|
+
internalCallback = (publicKey) => callback(_optionalChain$r([publicKey, 'optionalAccess', _9 => _9.toString, 'call', _10 => _10()]));
|
|
337
337
|
this.getProvider().on('accountChanged', internalCallback);
|
|
338
338
|
break
|
|
339
339
|
}
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
}
|
|
387
387
|
} WindowSolana.__initStatic(); WindowSolana.__initStatic2();
|
|
388
388
|
|
|
389
|
-
function _optionalChain$
|
|
389
|
+
function _optionalChain$q(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; }
|
|
390
390
|
|
|
391
391
|
class Backpack extends WindowSolana {
|
|
392
392
|
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
|
|
399
399
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
400
400
|
return (
|
|
401
|
-
_optionalChain$
|
|
401
|
+
_optionalChain$q([window, 'optionalAccess', _2 => _2.backpack]) &&
|
|
402
402
|
window.backpack.isBackpack
|
|
403
403
|
)
|
|
404
404
|
};}
|
|
@@ -416,6 +416,8 @@
|
|
|
416
416
|
}
|
|
417
417
|
} Backpack.__initStatic(); Backpack.__initStatic2();
|
|
418
418
|
|
|
419
|
+
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; }
|
|
420
|
+
|
|
419
421
|
const sendTransaction$3 = async ({ transaction, wallet })=> {
|
|
420
422
|
transaction = new Transaction(transaction);
|
|
421
423
|
if((await wallet.connectedTo(transaction.blockchain)) == false) {
|
|
@@ -468,7 +470,10 @@
|
|
|
468
470
|
try {
|
|
469
471
|
|
|
470
472
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
471
|
-
if(
|
|
473
|
+
if(
|
|
474
|
+
(error && _optionalChain$p([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
475
|
+
(error && error.toString().match('undefined'))
|
|
476
|
+
) {
|
|
472
477
|
setTimeout(()=>{
|
|
473
478
|
retrieveConfirmedTransaction$3(sentTransaction)
|
|
474
479
|
.then(resolve)
|
|
@@ -479,7 +484,10 @@
|
|
|
479
484
|
}
|
|
480
485
|
});
|
|
481
486
|
} catch(error) {
|
|
482
|
-
if(
|
|
487
|
+
if(
|
|
488
|
+
(error && _optionalChain$p([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
489
|
+
(error && error.toString().match('undefined'))
|
|
490
|
+
) {
|
|
483
491
|
setTimeout(()=>{
|
|
484
492
|
retrieveConfirmedTransaction$3(sentTransaction)
|
|
485
493
|
.then(resolve)
|
|
@@ -522,7 +530,7 @@
|
|
|
522
530
|
})
|
|
523
531
|
};
|
|
524
532
|
|
|
525
|
-
function _optionalChain$
|
|
533
|
+
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; }
|
|
526
534
|
|
|
527
535
|
class WindowEthereum {
|
|
528
536
|
|
|
@@ -534,31 +542,31 @@
|
|
|
534
542
|
|
|
535
543
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
536
544
|
return (
|
|
537
|
-
_optionalChain$
|
|
545
|
+
_optionalChain$o([window, 'optionalAccess', _31 => _31.ethereum]) &&
|
|
538
546
|
// not MetaMask
|
|
539
|
-
!(_optionalChain$
|
|
547
|
+
!(_optionalChain$o([window, 'optionalAccess', _32 => _32.ethereum, 'optionalAccess', _33 => _33.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
|
|
540
548
|
// not Coin98
|
|
541
|
-
!_optionalChain$
|
|
549
|
+
!_optionalChain$o([window, 'optionalAccess', _34 => _34.coin98]) &&
|
|
542
550
|
// not Trust Wallet
|
|
543
|
-
!(_optionalChain$
|
|
551
|
+
!(_optionalChain$o([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isTrust]) || _optionalChain$o([window, 'optionalAccess', _37 => _37.ethereum, 'optionalAccess', _38 => _38.isTrustWallet])) &&
|
|
544
552
|
// not crypto.com
|
|
545
|
-
!_optionalChain$
|
|
553
|
+
!_optionalChain$o([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isDeficonnectProvider]) &&
|
|
546
554
|
// not HyperPay
|
|
547
|
-
!_optionalChain$
|
|
555
|
+
!_optionalChain$o([window, 'optionalAccess', _41 => _41.ethereum, 'optionalAccess', _42 => _42.isHyperPay]) &&
|
|
548
556
|
// not Phantom
|
|
549
|
-
!(window.phantom && !window.glow && !_optionalChain$
|
|
557
|
+
!(window.phantom && !window.glow && !_optionalChain$o([window, 'optionalAccess', _43 => _43.solana, 'optionalAccess', _44 => _44.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
|
|
550
558
|
// not Rabby
|
|
551
|
-
!_optionalChain$
|
|
559
|
+
!_optionalChain$o([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isRabby]) &&
|
|
552
560
|
// not Backpack
|
|
553
|
-
!_optionalChain$
|
|
561
|
+
!_optionalChain$o([window, 'optionalAccess', _47 => _47.backpack, 'optionalAccess', _48 => _48.isBackpack]) &&
|
|
554
562
|
// not TokenPocket
|
|
555
|
-
!_optionalChain$
|
|
563
|
+
!_optionalChain$o([window, 'optionalAccess', _49 => _49.ethereum, 'optionalAccess', _50 => _50.isTokenPocket]) &&
|
|
556
564
|
// not BitKeep
|
|
557
|
-
!_optionalChain$
|
|
565
|
+
!_optionalChain$o([window, 'optionalAccess', _51 => _51.ethereum, 'optionalAccess', _52 => _52.isBitKeep]) &&
|
|
558
566
|
// not Coinbase
|
|
559
|
-
!(_optionalChain$
|
|
567
|
+
!(_optionalChain$o([window, 'optionalAccess', _53 => _53.ethereum, 'optionalAccess', _54 => _54.isCoinbaseWallet]) || _optionalChain$o([window, 'optionalAccess', _55 => _55.ethereum, 'optionalAccess', _56 => _56.isWalletLink])) &&
|
|
560
568
|
// MetaMask through ProviderMap
|
|
561
|
-
!_optionalChain$
|
|
569
|
+
!_optionalChain$o([window, 'optionalAccess', _57 => _57.ethereum, 'optionalAccess', _58 => _58.providerMap, 'optionalAccess', _59 => _59.has, 'call', _60 => _60('MetaMask')])
|
|
562
570
|
)
|
|
563
571
|
};}
|
|
564
572
|
|
|
@@ -684,7 +692,7 @@
|
|
|
684
692
|
}
|
|
685
693
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
686
694
|
|
|
687
|
-
function _optionalChain$
|
|
695
|
+
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; }
|
|
688
696
|
class Binance extends WindowEthereum {
|
|
689
697
|
|
|
690
698
|
static __initStatic() {this.info = {
|
|
@@ -694,7 +702,7 @@
|
|
|
694
702
|
};}
|
|
695
703
|
|
|
696
704
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
697
|
-
return _optionalChain$
|
|
705
|
+
return _optionalChain$n([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
698
706
|
!window.coin98 &&
|
|
699
707
|
!window.trustwallet
|
|
700
708
|
};}
|
|
@@ -703,7 +711,7 @@
|
|
|
703
711
|
|
|
704
712
|
} Binance.__initStatic(); Binance.__initStatic2();
|
|
705
713
|
|
|
706
|
-
function _optionalChain$
|
|
714
|
+
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; }
|
|
707
715
|
class Brave extends WindowEthereum {
|
|
708
716
|
|
|
709
717
|
static __initStatic() {this.info = {
|
|
@@ -712,7 +720,7 @@
|
|
|
712
720
|
blockchains: supported$1.evm
|
|
713
721
|
};}
|
|
714
722
|
|
|
715
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
723
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$m([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
716
724
|
} Brave.__initStatic(); Brave.__initStatic2();
|
|
717
725
|
|
|
718
726
|
var logos = {
|
|
@@ -723,7 +731,7 @@
|
|
|
723
731
|
trust: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA5Ni41IDk2LjUiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDk2LjUgOTYuNSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgZmlsbD0iI0ZGRkZGRiIgd2lkdGg9Ijk2LjUiIGhlaWdodD0iOTYuNSIvPgo8cGF0aCBzdHJva2U9IiMzMzc1QkIiIHN0cm9rZS13aWR0aD0iNi4wNjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQgPSIxMCIgZmlsbD0ibm9uZSIgZD0ibTQ4LjUgMjAuMWM5LjYgOCAyMC42IDcuNSAyMy43IDcuNS0wLjcgNDUuNS01LjkgMzYuNS0yMy43IDQ5LjMtMTcuOC0xMi44LTIzLTMuNy0yMy43LTQ5LjMgMy4yIDAgMTQuMSAwLjUgMjMuNy03LjV6Ii8+Cjwvc3ZnPgo=",
|
|
724
732
|
};
|
|
725
733
|
|
|
726
|
-
function _optionalChain$
|
|
734
|
+
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; }
|
|
727
735
|
class Coin98EVM extends WindowEthereum {
|
|
728
736
|
|
|
729
737
|
static __initStatic() {this.info = {
|
|
@@ -733,13 +741,13 @@
|
|
|
733
741
|
platform: 'evm',
|
|
734
742
|
};}
|
|
735
743
|
|
|
736
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
744
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$l([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
737
745
|
|
|
738
746
|
getProvider() { return window.coin98.provider }
|
|
739
747
|
|
|
740
748
|
} Coin98EVM.__initStatic(); Coin98EVM.__initStatic2();
|
|
741
749
|
|
|
742
|
-
function _optionalChain$
|
|
750
|
+
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; }
|
|
743
751
|
class Coin98SVM extends WindowSolana {
|
|
744
752
|
|
|
745
753
|
static __initStatic() {this.info = {
|
|
@@ -749,13 +757,13 @@
|
|
|
749
757
|
platform: 'svm',
|
|
750
758
|
};}
|
|
751
759
|
|
|
752
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
760
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$k([window, 'optionalAccess', _3 => _3.coin98, 'optionalAccess', _4 => _4.sol]) };}
|
|
753
761
|
|
|
754
762
|
getProvider() { return window.coin98.sol }
|
|
755
763
|
|
|
756
764
|
} Coin98SVM.__initStatic(); Coin98SVM.__initStatic2();
|
|
757
765
|
|
|
758
|
-
function _optionalChain$
|
|
766
|
+
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; }
|
|
759
767
|
class CoinbaseEVM extends WindowEthereum {
|
|
760
768
|
|
|
761
769
|
static __initStatic() {this.info = {
|
|
@@ -766,8 +774,8 @@
|
|
|
766
774
|
};}
|
|
767
775
|
|
|
768
776
|
getProvider() {
|
|
769
|
-
if(_optionalChain$
|
|
770
|
-
return _optionalChain$
|
|
777
|
+
if(_optionalChain$j([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
|
|
778
|
+
return _optionalChain$j([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
|
|
771
779
|
} else {
|
|
772
780
|
return window.ethereum
|
|
773
781
|
}
|
|
@@ -776,9 +784,9 @@
|
|
|
776
784
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
777
785
|
return(
|
|
778
786
|
(
|
|
779
|
-
_optionalChain$
|
|
787
|
+
_optionalChain$j([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$j([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
|
|
780
788
|
) || (
|
|
781
|
-
_optionalChain$
|
|
789
|
+
_optionalChain$j([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
|
|
782
790
|
)
|
|
783
791
|
)
|
|
784
792
|
};}
|
|
@@ -802,7 +810,7 @@
|
|
|
802
810
|
};}
|
|
803
811
|
} CoinbaseSVM.__initStatic(); CoinbaseSVM.__initStatic2();
|
|
804
812
|
|
|
805
|
-
function _optionalChain$
|
|
813
|
+
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; }
|
|
806
814
|
class CryptoCom extends WindowEthereum {
|
|
807
815
|
|
|
808
816
|
static __initStatic() {this.info = {
|
|
@@ -811,10 +819,10 @@
|
|
|
811
819
|
blockchains: supported$1.evm
|
|
812
820
|
};}
|
|
813
821
|
|
|
814
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
822
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$i([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
815
823
|
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
816
824
|
|
|
817
|
-
function _optionalChain$
|
|
825
|
+
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; }
|
|
818
826
|
class ExodusEVM extends WindowEthereum {
|
|
819
827
|
|
|
820
828
|
static __initStatic() {this.info = {
|
|
@@ -824,10 +832,10 @@
|
|
|
824
832
|
platform: 'evm',
|
|
825
833
|
};}
|
|
826
834
|
|
|
827
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
835
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
|
|
828
836
|
} ExodusEVM.__initStatic(); ExodusEVM.__initStatic2();
|
|
829
837
|
|
|
830
|
-
function _optionalChain$
|
|
838
|
+
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; }
|
|
831
839
|
class ExodusSVM extends WindowSolana {
|
|
832
840
|
|
|
833
841
|
static __initStatic() {this.info = {
|
|
@@ -837,7 +845,7 @@
|
|
|
837
845
|
platform: 'svm',
|
|
838
846
|
};}
|
|
839
847
|
|
|
840
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
848
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isExodus]) };}
|
|
841
849
|
} ExodusSVM.__initStatic(); ExodusSVM.__initStatic2();
|
|
842
850
|
|
|
843
851
|
class Glow extends WindowSolana {
|
|
@@ -856,7 +864,7 @@
|
|
|
856
864
|
};}
|
|
857
865
|
} Glow.__initStatic(); Glow.__initStatic2();
|
|
858
866
|
|
|
859
|
-
function _optionalChain$
|
|
867
|
+
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; }
|
|
860
868
|
class HyperPay extends WindowEthereum {
|
|
861
869
|
|
|
862
870
|
static __initStatic() {this.info = {
|
|
@@ -865,10 +873,10 @@
|
|
|
865
873
|
blockchains: supported$1.evm
|
|
866
874
|
};}
|
|
867
875
|
|
|
868
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
876
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
|
|
869
877
|
} HyperPay.__initStatic(); HyperPay.__initStatic2();
|
|
870
878
|
|
|
871
|
-
function _optionalChain$
|
|
879
|
+
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; }
|
|
872
880
|
class MetaMask extends WindowEthereum {
|
|
873
881
|
|
|
874
882
|
static __initStatic() {this.info = {
|
|
@@ -878,8 +886,8 @@
|
|
|
878
886
|
};}
|
|
879
887
|
|
|
880
888
|
getProvider() {
|
|
881
|
-
if(_optionalChain$
|
|
882
|
-
return _optionalChain$
|
|
889
|
+
if(_optionalChain$e([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.providerMap, 'optionalAccess', _9 => _9.has, 'call', _10 => _10('MetaMask')])) {
|
|
890
|
+
return _optionalChain$e([window, 'optionalAccess', _11 => _11.ethereum, 'optionalAccess', _12 => _12.providerMap, 'optionalAccess', _13 => _13.get, 'call', _14 => _14('MetaMask')])
|
|
883
891
|
} else {
|
|
884
892
|
return window.ethereum
|
|
885
893
|
}
|
|
@@ -888,16 +896,16 @@
|
|
|
888
896
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
889
897
|
return(
|
|
890
898
|
(
|
|
891
|
-
_optionalChain$
|
|
899
|
+
_optionalChain$e([window, 'optionalAccess', _15 => _15.ethereum, 'optionalAccess', _16 => _16.isMetaMask]) &&
|
|
892
900
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
893
901
|
) || (
|
|
894
|
-
_optionalChain$
|
|
902
|
+
_optionalChain$e([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.providerMap, 'optionalAccess', _19 => _19.has, 'call', _20 => _20('MetaMask')])
|
|
895
903
|
)
|
|
896
904
|
)
|
|
897
905
|
};}
|
|
898
906
|
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
899
907
|
|
|
900
|
-
function _optionalChain$
|
|
908
|
+
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; }
|
|
901
909
|
class Opera extends WindowEthereum {
|
|
902
910
|
|
|
903
911
|
static __initStatic() {this.info = {
|
|
@@ -906,7 +914,7 @@
|
|
|
906
914
|
blockchains: supported$1.evm
|
|
907
915
|
};}
|
|
908
916
|
|
|
909
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
917
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
910
918
|
} Opera.__initStatic(); Opera.__initStatic2();
|
|
911
919
|
|
|
912
920
|
class PhantomEVM extends WindowEthereum {
|
|
@@ -914,7 +922,7 @@
|
|
|
914
922
|
static __initStatic() {this.info = {
|
|
915
923
|
name: 'Phantom',
|
|
916
924
|
logo: logos.phantom,
|
|
917
|
-
blockchains:
|
|
925
|
+
blockchains: ['ethereum', 'polygon'],
|
|
918
926
|
platform: 'evm',
|
|
919
927
|
};}
|
|
920
928
|
|
|
@@ -926,7 +934,7 @@
|
|
|
926
934
|
};}
|
|
927
935
|
} PhantomEVM.__initStatic(); PhantomEVM.__initStatic2();
|
|
928
936
|
|
|
929
|
-
function _optionalChain$
|
|
937
|
+
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; }
|
|
930
938
|
class PhantomSVM extends WindowSolana {
|
|
931
939
|
|
|
932
940
|
static __initStatic() {this.info = {
|
|
@@ -940,14 +948,14 @@
|
|
|
940
948
|
return (
|
|
941
949
|
window.phantom &&
|
|
942
950
|
!window.glow &&
|
|
943
|
-
!_optionalChain$
|
|
944
|
-
!_optionalChain$
|
|
951
|
+
!_optionalChain$c([window, 'optionalAccess', _5 => _5.solana, 'optionalAccess', _6 => _6.isGlow]) &&
|
|
952
|
+
!_optionalChain$c([window, 'optionalAccess', _7 => _7.solana, 'optionalAccess', _8 => _8.isExodus]) &&
|
|
945
953
|
!['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])
|
|
946
954
|
)
|
|
947
955
|
};}
|
|
948
956
|
} PhantomSVM.__initStatic(); PhantomSVM.__initStatic2();
|
|
949
957
|
|
|
950
|
-
function _optionalChain$
|
|
958
|
+
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; }
|
|
951
959
|
class Rabby extends WindowEthereum {
|
|
952
960
|
|
|
953
961
|
static __initStatic() {this.info = {
|
|
@@ -958,12 +966,12 @@
|
|
|
958
966
|
|
|
959
967
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
960
968
|
return(
|
|
961
|
-
_optionalChain$
|
|
969
|
+
_optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
|
|
962
970
|
)
|
|
963
971
|
};}
|
|
964
972
|
} Rabby.__initStatic(); Rabby.__initStatic2();
|
|
965
973
|
|
|
966
|
-
function _optionalChain$
|
|
974
|
+
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; }
|
|
967
975
|
|
|
968
976
|
|
|
969
977
|
const KEY$2 = '_DePayWeb3WalletsConnectedSolanaMobileWalletInstance';
|
|
@@ -1054,8 +1062,8 @@
|
|
|
1054
1062
|
await solanaWeb3_js.transact(
|
|
1055
1063
|
async (wallet) => {
|
|
1056
1064
|
await this.authorize(wallet);
|
|
1057
|
-
if(_optionalChain$
|
|
1058
|
-
if(_optionalChain$
|
|
1065
|
+
if(_optionalChain$a([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$2+'_name'] = this.name = options.name; }
|
|
1066
|
+
if(_optionalChain$a([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$2+'_logo'] = this.logo = options.logo; }
|
|
1059
1067
|
}
|
|
1060
1068
|
);
|
|
1061
1069
|
return this._account
|
|
@@ -1114,7 +1122,7 @@
|
|
|
1114
1122
|
}
|
|
1115
1123
|
} SolanaMobileWalletAdapter.__initStatic(); SolanaMobileWalletAdapter.__initStatic2();
|
|
1116
1124
|
|
|
1117
|
-
function _optionalChain$
|
|
1125
|
+
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; }
|
|
1118
1126
|
class Solflare extends WindowSolana {
|
|
1119
1127
|
|
|
1120
1128
|
static __initStatic() {this.info = {
|
|
@@ -1125,7 +1133,7 @@
|
|
|
1125
1133
|
|
|
1126
1134
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1127
1135
|
return (
|
|
1128
|
-
_optionalChain$
|
|
1136
|
+
_optionalChain$9([window, 'optionalAccess', _2 => _2.solflare]) &&
|
|
1129
1137
|
window.solflare.isSolflare
|
|
1130
1138
|
)
|
|
1131
1139
|
};}
|
|
@@ -1135,7 +1143,7 @@
|
|
|
1135
1143
|
_sendTransaction(transaction) { return this.getProvider().signTransaction(transaction) }
|
|
1136
1144
|
} Solflare.__initStatic(); Solflare.__initStatic2();
|
|
1137
1145
|
|
|
1138
|
-
function _optionalChain$
|
|
1146
|
+
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; }
|
|
1139
1147
|
class TokenPocket extends WindowEthereum {
|
|
1140
1148
|
|
|
1141
1149
|
static __initStatic() {this.info = {
|
|
@@ -1146,12 +1154,12 @@
|
|
|
1146
1154
|
|
|
1147
1155
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1148
1156
|
return (
|
|
1149
|
-
_optionalChain$
|
|
1157
|
+
_optionalChain$8([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
|
|
1150
1158
|
)
|
|
1151
1159
|
};}
|
|
1152
1160
|
} TokenPocket.__initStatic(); TokenPocket.__initStatic2();
|
|
1153
1161
|
|
|
1154
|
-
function _optionalChain$
|
|
1162
|
+
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; }
|
|
1155
1163
|
class TrustEVM extends WindowEthereum {
|
|
1156
1164
|
|
|
1157
1165
|
static __initStatic() {this.info = {
|
|
@@ -1163,13 +1171,13 @@
|
|
|
1163
1171
|
|
|
1164
1172
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1165
1173
|
return (
|
|
1166
|
-
(_optionalChain$
|
|
1174
|
+
(_optionalChain$7([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$7([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
|
|
1167
1175
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
1168
1176
|
)
|
|
1169
1177
|
};}
|
|
1170
1178
|
} TrustEVM.__initStatic(); TrustEVM.__initStatic2();
|
|
1171
1179
|
|
|
1172
|
-
function _optionalChain$
|
|
1180
|
+
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; }
|
|
1173
1181
|
class TrustSVM extends WindowSolana {
|
|
1174
1182
|
|
|
1175
1183
|
static __initStatic() {this.info = {
|
|
@@ -1180,7 +1188,7 @@
|
|
|
1180
1188
|
};}
|
|
1181
1189
|
|
|
1182
1190
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1183
|
-
return _optionalChain$
|
|
1191
|
+
return _optionalChain$6([window, 'access', _3 => _3.solana, 'optionalAccess', _4 => _4.isTrustWallet])
|
|
1184
1192
|
};}
|
|
1185
1193
|
} TrustSVM.__initStatic(); TrustSVM.__initStatic2();
|
|
1186
1194
|
|
|
@@ -1283,7 +1291,7 @@
|
|
|
1283
1291
|
}
|
|
1284
1292
|
};
|
|
1285
1293
|
|
|
1286
|
-
function _optionalChain$
|
|
1294
|
+
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; }
|
|
1287
1295
|
|
|
1288
1296
|
const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
1289
1297
|
transaction = new Transaction(transaction);
|
|
@@ -1336,7 +1344,10 @@
|
|
|
1336
1344
|
try {
|
|
1337
1345
|
|
|
1338
1346
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
1339
|
-
if(
|
|
1347
|
+
if(
|
|
1348
|
+
(error && _optionalChain$5([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
1349
|
+
(error && error.toString().match('undefined'))
|
|
1350
|
+
) {
|
|
1340
1351
|
setTimeout(()=>{
|
|
1341
1352
|
retrieveConfirmedTransaction$2(sentTransaction)
|
|
1342
1353
|
.then(resolve)
|
|
@@ -1347,7 +1358,10 @@
|
|
|
1347
1358
|
}
|
|
1348
1359
|
});
|
|
1349
1360
|
} catch (error) {
|
|
1350
|
-
if(
|
|
1361
|
+
if(
|
|
1362
|
+
(error && _optionalChain$5([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
1363
|
+
(error && error.toString().match('undefined'))
|
|
1364
|
+
) {
|
|
1351
1365
|
setTimeout(()=>{
|
|
1352
1366
|
retrieveConfirmedTransaction$2(sentTransaction)
|
|
1353
1367
|
.then(resolve)
|
|
@@ -1392,7 +1406,7 @@
|
|
|
1392
1406
|
const submitContractInteraction$2 = async ({ transaction, wallet })=>{
|
|
1393
1407
|
const provider = await web3Client.getProvider(transaction.blockchain);
|
|
1394
1408
|
let gasPrice = await provider.getGasPrice();
|
|
1395
|
-
if(_optionalChain$
|
|
1409
|
+
if(_optionalChain$5([wallet, 'access', _7 => _7.session, 'optionalAccess', _8 => _8.peerMeta, 'optionalAccess', _9 => _9.name]) === 'Uniswap Wallet') {
|
|
1396
1410
|
gasPrice = undefined;
|
|
1397
1411
|
} else {
|
|
1398
1412
|
gasPrice = gasPrice.toHexString();
|
|
@@ -1416,7 +1430,7 @@
|
|
|
1416
1430
|
const submitSimpleTransfer$2 = async ({ transaction, wallet })=>{
|
|
1417
1431
|
const provider = await web3Client.getProvider(transaction.blockchain);
|
|
1418
1432
|
let gasPrice = await provider.getGasPrice();
|
|
1419
|
-
if(_optionalChain$
|
|
1433
|
+
if(_optionalChain$5([wallet, 'access', _10 => _10.session, 'optionalAccess', _11 => _11.peerMeta, 'optionalAccess', _12 => _12.name]) === 'Uniswap Wallet') {
|
|
1420
1434
|
gasPrice = undefined;
|
|
1421
1435
|
} else {
|
|
1422
1436
|
gasPrice = gasPrice.toHexString();
|
|
@@ -1435,7 +1449,7 @@
|
|
|
1435
1449
|
})
|
|
1436
1450
|
};
|
|
1437
1451
|
|
|
1438
|
-
function _optionalChain$
|
|
1452
|
+
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; }
|
|
1439
1453
|
|
|
1440
1454
|
const KEY$1 = '_DePayWeb3WalletsConnectedWalletConnectV1Instance';
|
|
1441
1455
|
|
|
@@ -1578,8 +1592,8 @@
|
|
|
1578
1592
|
let session = await this.connector.connect();
|
|
1579
1593
|
this.session = session;
|
|
1580
1594
|
|
|
1581
|
-
if(_optionalChain$
|
|
1582
|
-
if(_optionalChain$
|
|
1595
|
+
if(_optionalChain$4([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
|
|
1596
|
+
if(_optionalChain$4([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
|
|
1583
1597
|
|
|
1584
1598
|
if(session.accounts instanceof Array && session.accounts.length) {
|
|
1585
1599
|
setConnectedInstance$1(this);
|
|
@@ -1723,6 +1737,8 @@
|
|
|
1723
1737
|
WalletConnectV1.getConnectedInstance = getConnectedInstance$2;
|
|
1724
1738
|
WalletConnectV1.setConnectedInstance = setConnectedInstance$1;
|
|
1725
1739
|
|
|
1740
|
+
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; }
|
|
1741
|
+
|
|
1726
1742
|
const sendTransaction$1 = async ({ transaction, wallet })=> {
|
|
1727
1743
|
transaction = new Transaction(transaction);
|
|
1728
1744
|
if((await wallet.connectedTo(transaction.blockchain)) == false) {
|
|
@@ -1774,7 +1790,10 @@
|
|
|
1774
1790
|
return new Promise((resolve, reject)=>{
|
|
1775
1791
|
try {
|
|
1776
1792
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
1777
|
-
if(
|
|
1793
|
+
if(
|
|
1794
|
+
(error && _optionalChain$3([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
1795
|
+
(error && error.toString().match('undefined'))
|
|
1796
|
+
) {
|
|
1778
1797
|
setTimeout(()=>{
|
|
1779
1798
|
retrieveConfirmedTransaction$1(sentTransaction)
|
|
1780
1799
|
.then(resolve)
|
|
@@ -1785,7 +1804,10 @@
|
|
|
1785
1804
|
}
|
|
1786
1805
|
});
|
|
1787
1806
|
} catch (error) {
|
|
1788
|
-
if(
|
|
1807
|
+
if(
|
|
1808
|
+
(error && _optionalChain$3([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
1809
|
+
(error && error.toString().match('undefined'))
|
|
1810
|
+
) {
|
|
1789
1811
|
setTimeout(()=>{
|
|
1790
1812
|
retrieveConfirmedTransaction$1(sentTransaction)
|
|
1791
1813
|
.then(resolve)
|
|
@@ -1813,7 +1835,10 @@
|
|
|
1813
1835
|
}
|
|
1814
1836
|
resolve(sentTransaction);
|
|
1815
1837
|
} catch (error) {
|
|
1816
|
-
if(
|
|
1838
|
+
if(
|
|
1839
|
+
(error && _optionalChain$3([error, 'optionalAccess', _7 => _7.stack, 'optionalAccess', _8 => _8.match, 'call', _9 => _9('JSON-RPC error')])) ||
|
|
1840
|
+
(error && error.toString().match('undefined'))
|
|
1841
|
+
) {
|
|
1817
1842
|
setTimeout(()=>{
|
|
1818
1843
|
retrieveTransaction(tx, blockchain)
|
|
1819
1844
|
.then(resolve)
|
|
@@ -1879,7 +1904,7 @@
|
|
|
1879
1904
|
}).catch((e)=>{console.log('ERROR', e);})
|
|
1880
1905
|
};
|
|
1881
1906
|
|
|
1882
|
-
function _optionalChain$
|
|
1907
|
+
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; }
|
|
1883
1908
|
|
|
1884
1909
|
const KEY = 'depay:wallets:wc2';
|
|
1885
1910
|
|
|
@@ -1998,11 +2023,11 @@
|
|
|
1998
2023
|
};
|
|
1999
2024
|
|
|
2000
2025
|
const getWalletConnectV2Config = (walletName)=>{
|
|
2001
|
-
const methods = _optionalChain$
|
|
2002
|
-
const events = _optionalChain$
|
|
2026
|
+
const methods = _optionalChain$2([CONFIGURATIONS, 'access', _ => _[walletName], 'optionalAccess', _2 => _2.methods]) || DEFAULT_CONFIGURATION.methods;
|
|
2027
|
+
const events = _optionalChain$2([CONFIGURATIONS, 'access', _3 => _3[walletName], 'optionalAccess', _4 => _4.events]) || DEFAULT_CONFIGURATION.events;
|
|
2003
2028
|
|
|
2004
2029
|
let requiredNamespaces = {};
|
|
2005
|
-
if(_optionalChain$
|
|
2030
|
+
if(_optionalChain$2([CONFIGURATIONS, 'access', _5 => _5[walletName], 'optionalAccess', _6 => _6.requiredNamespaces])) {
|
|
2006
2031
|
requiredNamespaces = CONFIGURATIONS[walletName].requiredNamespaces;
|
|
2007
2032
|
} else {
|
|
2008
2033
|
requiredNamespaces['eip155'] = {
|
|
@@ -2015,14 +2040,14 @@
|
|
|
2015
2040
|
}
|
|
2016
2041
|
|
|
2017
2042
|
let optionalNamespaces = {};
|
|
2018
|
-
if(_optionalChain$
|
|
2043
|
+
if(_optionalChain$2([CONFIGURATIONS, 'access', _7 => _7[walletName], 'optionalAccess', _8 => _8.optionalNamespaces])) {
|
|
2019
2044
|
optionalNamespaces = CONFIGURATIONS[walletName].optionalNamespaces;
|
|
2020
2045
|
} else {
|
|
2021
2046
|
optionalNamespaces['eip155'] = {
|
|
2022
2047
|
chains: supported$1.evm.map((blockchain)=>`${Blockchains__default['default'][blockchain].namespace}:${Blockchains__default['default'][blockchain].networkId}`),
|
|
2023
2048
|
};
|
|
2024
2049
|
}
|
|
2025
|
-
if(_optionalChain$
|
|
2050
|
+
if(_optionalChain$2([optionalNamespaces, 'optionalAccess', _9 => _9.eip155]) && _optionalChain$2([optionalNamespaces, 'optionalAccess', _10 => _10.eip155, 'optionalAccess', _11 => _11.chains, 'optionalAccess', _12 => _12.length])) {
|
|
2026
2051
|
optionalNamespaces['eip155'].methods = methods;
|
|
2027
2052
|
optionalNamespaces['eip155'].events = events;
|
|
2028
2053
|
}
|
|
@@ -2037,9 +2062,9 @@
|
|
|
2037
2062
|
projectId: localStorage[KEY+":projectId"],
|
|
2038
2063
|
metadata: {
|
|
2039
2064
|
name: document.title || 'dApp',
|
|
2040
|
-
description: _optionalChain$
|
|
2065
|
+
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',
|
|
2041
2066
|
url: location.href,
|
|
2042
|
-
icons: [_optionalChain$
|
|
2067
|
+
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`]
|
|
2043
2068
|
}
|
|
2044
2069
|
});
|
|
2045
2070
|
resolve(signClient);
|
|
@@ -2057,7 +2082,7 @@
|
|
|
2057
2082
|
};}
|
|
2058
2083
|
|
|
2059
2084
|
static __initStatic2() {this.isAvailable = async(options)=>{
|
|
2060
|
-
return !! await getLastSession(_optionalChain$
|
|
2085
|
+
return !! await getLastSession(_optionalChain$2([options, 'optionalAccess', _21 => _21.walletName]))
|
|
2061
2086
|
};}
|
|
2062
2087
|
|
|
2063
2088
|
constructor() {
|
|
@@ -2072,19 +2097,19 @@
|
|
|
2072
2097
|
}
|
|
2073
2098
|
|
|
2074
2099
|
async account() {
|
|
2075
|
-
if(_optionalChain$
|
|
2100
|
+
if(_optionalChain$2([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.namespaces, 'optionalAccess', _24 => _24.eip155, 'optionalAccess', _25 => _25.accounts, 'optionalAccess', _26 => _26.length])) {
|
|
2076
2101
|
return this.session.namespaces.eip155.accounts[0].split(':')[2]
|
|
2077
2102
|
}
|
|
2078
2103
|
}
|
|
2079
2104
|
|
|
2080
2105
|
async setSessionBlockchains() {
|
|
2081
|
-
if(!this.session || !_optionalChain$
|
|
2082
|
-
if(_optionalChain$
|
|
2083
|
-
this.blockchains = [this.session.namespaces.eip155.chains[this.session.namespaces.eip155.chains.length-1]].map((chainIdentifier)=>_optionalChain$
|
|
2106
|
+
if(!this.session || !_optionalChain$2([this, 'access', _27 => _27.session, 'optionalAccess', _28 => _28.namespaces, 'optionalAccess', _29 => _29.eip155])) { return }
|
|
2107
|
+
if(_optionalChain$2([CONFIGURATIONS, 'access', _30 => _30[this.walletName], 'optionalAccess', _31 => _31.methods, 'optionalAccess', _32 => _32.includes, 'call', _33 => _33('wallet_switchEthereumChain')])) {
|
|
2108
|
+
this.blockchains = [this.session.namespaces.eip155.chains[this.session.namespaces.eip155.chains.length-1]].map((chainIdentifier)=>_optionalChain$2([Blockchains__default['default'], 'access', _34 => _34.findByNetworkId, 'call', _35 => _35(chainIdentifier.split(':')[1]), 'optionalAccess', _36 => _36.name])).filter(Boolean);
|
|
2084
2109
|
} else if(this.session.namespaces.eip155.chains) {
|
|
2085
|
-
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$
|
|
2110
|
+
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$2([Blockchains__default['default'], 'access', _37 => _37.findByNetworkId, 'call', _38 => _38(chainIdentifier.split(':')[1]), 'optionalAccess', _39 => _39.name])).filter(Boolean);
|
|
2086
2111
|
} else if(this.session.namespaces.eip155.accounts) {
|
|
2087
|
-
this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$
|
|
2112
|
+
this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$2([Blockchains__default['default'], 'access', _40 => _40.findByNetworkId, 'call', _41 => _41(accountIdentifier.split(':')[1]), 'optionalAccess', _42 => _42.name])).filter(Boolean);
|
|
2088
2113
|
}
|
|
2089
2114
|
}
|
|
2090
2115
|
|
|
@@ -2094,13 +2119,13 @@
|
|
|
2094
2119
|
|
|
2095
2120
|
try {
|
|
2096
2121
|
|
|
2097
|
-
this.walletName = _optionalChain$
|
|
2122
|
+
this.walletName = _optionalChain$2([options, 'optionalAccess', _43 => _43.name]);
|
|
2098
2123
|
|
|
2099
2124
|
// delete localStorage[`wc@2:client:0.3//session`] // DELETE WC SESSIONS
|
|
2100
2125
|
this.signClient = await getSignClient();
|
|
2101
2126
|
|
|
2102
2127
|
this.signClient.on("session_delete", (session)=> {
|
|
2103
|
-
if(_optionalChain$
|
|
2128
|
+
if(_optionalChain$2([session, 'optionalAccess', _44 => _44.topic]) === _optionalChain$2([this, 'access', _45 => _45.session, 'optionalAccess', _46 => _46.topic])) {
|
|
2104
2129
|
localStorage[KEY+':name'] = undefined;
|
|
2105
2130
|
localStorage[KEY+':logo'] = undefined;
|
|
2106
2131
|
this.signClient = undefined;
|
|
@@ -2109,14 +2134,14 @@
|
|
|
2109
2134
|
});
|
|
2110
2135
|
|
|
2111
2136
|
this.signClient.on("session_update", async(session)=> {
|
|
2112
|
-
if(_optionalChain$
|
|
2137
|
+
if(_optionalChain$2([session, 'optionalAccess', _47 => _47.topic]) === _optionalChain$2([this, 'access', _48 => _48.session, 'optionalAccess', _49 => _49.topic])) {
|
|
2113
2138
|
this.session = this.signClient.session.get(session.topic);
|
|
2114
2139
|
await this.setSessionBlockchains();
|
|
2115
2140
|
}
|
|
2116
2141
|
});
|
|
2117
2142
|
|
|
2118
2143
|
this.signClient.on("session_event", (event)=> {
|
|
2119
|
-
if(_optionalChain$
|
|
2144
|
+
if(_optionalChain$2([event, 'optionalAccess', _50 => _50.topic]) === _optionalChain$2([this, 'access', _51 => _51.session, 'optionalAccess', _52 => _52.topic])) {}
|
|
2120
2145
|
});
|
|
2121
2146
|
|
|
2122
2147
|
const connectWallet = async()=>{
|
|
@@ -2127,24 +2152,24 @@
|
|
|
2127
2152
|
await new Promise(resolve=>setTimeout(resolve, 500)); // to prevent race condition within WalletConnect
|
|
2128
2153
|
};
|
|
2129
2154
|
|
|
2130
|
-
const lastSession = _optionalChain$
|
|
2155
|
+
const lastSession = _optionalChain$2([this, 'optionalAccess', _53 => _53.walletName, 'optionalAccess', _54 => _54.length]) ? await getLastSession(this.walletName) : undefined;
|
|
2131
2156
|
if(lastSession) {
|
|
2132
2157
|
this.session = lastSession;
|
|
2133
2158
|
} else {
|
|
2134
2159
|
await connectWallet();
|
|
2135
2160
|
}
|
|
2136
2161
|
|
|
2137
|
-
let meta = _optionalChain$
|
|
2162
|
+
let meta = _optionalChain$2([this, 'access', _55 => _55.session, 'optionalAccess', _56 => _56.peer, 'optionalAccess', _57 => _57.metadata]);
|
|
2138
2163
|
if(meta && meta.name) {
|
|
2139
2164
|
this.name = meta.name;
|
|
2140
2165
|
localStorage[KEY+':name'] = meta.name;
|
|
2141
|
-
if(_optionalChain$
|
|
2166
|
+
if(_optionalChain$2([meta, 'optionalAccess', _58 => _58.icons]) && meta.icons.length) {
|
|
2142
2167
|
this.logo = meta.icons[0];
|
|
2143
2168
|
localStorage[KEY+':logo'] = this.logo;
|
|
2144
2169
|
}
|
|
2145
2170
|
}
|
|
2146
|
-
if(_optionalChain$
|
|
2147
|
-
if(_optionalChain$
|
|
2171
|
+
if(_optionalChain$2([options, 'optionalAccess', _59 => _59.name])) { localStorage[KEY+':name'] = this.name = options.name; }
|
|
2172
|
+
if(_optionalChain$2([options, 'optionalAccess', _60 => _60.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
|
|
2148
2173
|
|
|
2149
2174
|
await this.setSessionBlockchains();
|
|
2150
2175
|
|
|
@@ -2201,7 +2226,7 @@
|
|
|
2201
2226
|
switch (event) {
|
|
2202
2227
|
case 'account':
|
|
2203
2228
|
internalCallback = async(event)=> {
|
|
2204
|
-
if(_optionalChain$
|
|
2229
|
+
if(_optionalChain$2([event, 'optionalAccess', _61 => _61.topic]) === _optionalChain$2([this, 'access', _62 => _62.session, 'optionalAccess', _63 => _63.topic]) && event.params.event.name === 'accountsChanged') {
|
|
2205
2230
|
callback(await this.account());
|
|
2206
2231
|
}
|
|
2207
2232
|
};
|
|
@@ -2261,6 +2286,7 @@
|
|
|
2261
2286
|
|
|
2262
2287
|
WalletConnectV2.getConnectedInstance = getConnectedInstance$1;
|
|
2263
2288
|
|
|
2289
|
+
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; }
|
|
2264
2290
|
const sendTransaction = async ({ transaction, wallet })=> {
|
|
2265
2291
|
transaction = new Transaction(transaction);
|
|
2266
2292
|
if((await wallet.connectedTo(transaction.blockchain)) == false) {
|
|
@@ -2311,7 +2337,10 @@
|
|
|
2311
2337
|
try {
|
|
2312
2338
|
|
|
2313
2339
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
2314
|
-
if(
|
|
2340
|
+
if(
|
|
2341
|
+
(error && _optionalChain$1([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
2342
|
+
(error && error.toString().match('undefined'))
|
|
2343
|
+
) {
|
|
2315
2344
|
setTimeout(()=>{
|
|
2316
2345
|
retrieveConfirmedTransaction(sentTransaction)
|
|
2317
2346
|
.then(resolve)
|
|
@@ -2322,7 +2351,10 @@
|
|
|
2322
2351
|
}
|
|
2323
2352
|
});
|
|
2324
2353
|
} catch(error) {
|
|
2325
|
-
if(
|
|
2354
|
+
if(
|
|
2355
|
+
(error && _optionalChain$1([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
2356
|
+
(error && error.toString().match('undefined'))
|
|
2357
|
+
) {
|
|
2326
2358
|
setTimeout(()=>{
|
|
2327
2359
|
retrieveConfirmedTransaction(sentTransaction)
|
|
2328
2360
|
.then(resolve)
|