@openocean.finance/wallet 1.8.8 → 1.8.9

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.
@@ -243,19 +243,20 @@ function link(reqConnectWalletVo, chain) {
243
243
  }
244
244
  function linkAddOrSwitch(wallet, chain) {
245
245
  return __awaiter(this, void 0, void 0, function () {
246
- var _a, currentProvider, utilsEht, chainId, params, address, address, switchError_1, address, address, error_1, message;
246
+ var _a, currentProvider, utilsEht, chainId, rpcUrls, blockExplorerUrl, nativeCurrency, chainName, params, address, address, switchError_1, address, address, error_1, message;
247
247
  return __generator(this, function (_b) {
248
248
  switch (_b.label) {
249
249
  case 0:
250
250
  _a = wallet.sdk || {}, currentProvider = _a.currentProvider, utilsEht = _a.utils;
251
251
  chainId = chain.chainId + '';
252
252
  if (!chain) return [3 /*break*/, 23];
253
+ rpcUrls = chain.rpcUrls, blockExplorerUrl = chain.blockExplorerUrl, nativeCurrency = chain.nativeCurrency, chainName = chain.chainName;
253
254
  params = {
254
255
  chainId: utilsEht.toHex(chainId),
255
- chainName: chain.chainName,
256
- nativeCurrency: chain.nativeCurrency,
257
- rpcUrls: chain.rpcUrls,
258
- blockExplorerUrls: [chain.blockExplorerUrl],
256
+ chainName: chainName,
257
+ nativeCurrency: nativeCurrency,
258
+ rpcUrls: rpcUrls,
259
+ blockExplorerUrls: [blockExplorerUrl.replace(/\/tx\/|\/transaction\//gi, '/')],
259
260
  };
260
261
  _b.label = 1;
261
262
  case 1:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/wallet",
3
- "version": "1.8.8",
3
+ "version": "1.8.9",
4
4
  "description": "A multi-chain wallets manager",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {