@openocean.finance/wallet 1.9.17 → 1.9.18
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/lib/TryWalletConnect/index.js +28 -30
- package/lib/assets/.DS_Store +0 -0
- package/package.json +1 -1
|
@@ -366,39 +366,37 @@ function tryWalletConnect(reqConnectWalletVo) {
|
|
|
366
366
|
case 5:
|
|
367
367
|
localProvider = '';
|
|
368
368
|
localRpcUrl = '';
|
|
369
|
-
if (
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
369
|
+
if (wallet && chain.compiler == 'EVM') {
|
|
370
|
+
if (reqConnectWalletVo.localRpcUrl) {
|
|
371
|
+
localProvider = new web3_1.default(new web3_1.default.providers.HttpProvider(reqConnectWalletVo.localRpcUrl));
|
|
372
|
+
localRpcUrl = reqConnectWalletVo.localRpcUrl;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
localProvider = null;
|
|
376
|
+
localRpcUrl = '';
|
|
377
|
+
if (chain.compiler == 'EVM') {
|
|
378
|
+
if (chain.rpcUrls && chain.rpcUrls.length) {
|
|
379
|
+
localRpcUrl = chain.rpcUrls[0];
|
|
380
|
+
}
|
|
381
|
+
else if (chain.chainId == '1') {
|
|
382
|
+
localRpcUrl = 'https://mainnet.infura.io/v3/';
|
|
383
|
+
}
|
|
384
|
+
else if (chain.chainId == '4') {
|
|
385
|
+
localRpcUrl = 'https://rinkeby.infura.io/v3/';
|
|
386
|
+
}
|
|
387
|
+
if (localRpcUrl) {
|
|
388
|
+
localProvider = wallet.sdk;
|
|
389
|
+
}
|
|
389
390
|
}
|
|
390
391
|
}
|
|
392
|
+
// await getSidName(wallet)
|
|
391
393
|
}
|
|
392
|
-
return [
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
chain: chain,
|
|
399
|
-
localProvider: localProvider,
|
|
400
|
-
localRpcUrl: localRpcUrl
|
|
401
|
-
}];
|
|
394
|
+
return [2 /*return*/, {
|
|
395
|
+
wallet: wallet,
|
|
396
|
+
chain: chain,
|
|
397
|
+
localProvider: localProvider,
|
|
398
|
+
localRpcUrl: localRpcUrl
|
|
399
|
+
}];
|
|
402
400
|
}
|
|
403
401
|
});
|
|
404
402
|
});
|
|
Binary file
|