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