@openocean.finance/wallet 1.10.12 → 1.10.14

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/Chains.js CHANGED
@@ -27,6 +27,7 @@ var chainObj = {
27
27
  blockExplorerUrl: "https://solscan.io/tx/",
28
28
  popularToken: ["SOL", "SNY", "USDT", "USDC", "RAY", "STEP"],
29
29
  rpcUrls: null,
30
+ chainId: 7565164,
30
31
  nativeCurrency: {
31
32
  symbol: "SOL",
32
33
  id: "solana",
@@ -71,6 +72,12 @@ var chainObj = {
71
72
  nativeCurrency: { name: "FTM", symbol: "FTM", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
72
73
  rpcUrls: ["https://rpcapi.fantom.network"]
73
74
  },
75
+ "sonic": {
76
+ compiler: 'EVM',
77
+ chainName: "Sonic Mainnet", chainId: 146, blockExplorerUrl: "https://sonicscan.org/tx/", popularToken: ["ETH", "USDT", "USDC"],
78
+ nativeCurrency: { name: "Sonic", symbol: "S", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
79
+ rpcUrls: ["https://rpc.soniclabs.com"]
80
+ },
74
81
  "arbitrum": {
75
82
  compiler: 'EVM',
76
83
  chainName: "Arbitrum", chainId: 42161, blockExplorerUrl: "https://arbiscan.io/tx/",
@@ -299,7 +306,7 @@ var chainObj = {
299
306
  chainId: 42220,
300
307
  blockExplorerUrl: "https://explorer.celo.org/mainnet/tx/",
301
308
  // 此处不设置地址,原因是celo没有存在正常意义上的native token
302
- nativeCurrency: { name: "CELO", symbol: "CELO", decimals: 18, address: "" },
309
+ nativeCurrency: { name: "CELO", symbol: "CELO", decimals: 18, address: "0x471ece3750da237f93b8e339c536989b8978a438" },
303
310
  popularToken: [],
304
311
  rpcUrls: [
305
312
  "https://forno.celo.org"
@@ -224,11 +224,13 @@ function link(reqConnectWalletVo, chain) {
224
224
  }
225
225
  function linkAddOrSwitch(wallet, chain) {
226
226
  return __awaiter(this, void 0, void 0, function () {
227
- var _a, currentProvider, utilsEht, chainId, rpcUrls, blockExplorerUrl, nativeCurrency, chainName, params, address, address, switchError_1, address, address, error_1, message;
227
+ var _a, currentProvider, utilsEht, sddf, chainId, rpcUrls, blockExplorerUrl, nativeCurrency, chainName, params, address, address, switchError_1, address, address, error_1, message;
228
228
  return __generator(this, function (_b) {
229
229
  switch (_b.label) {
230
230
  case 0:
231
231
  _a = wallet.sdk || {}, currentProvider = _a.currentProvider, utilsEht = _a.utils;
232
+ sddf = wallet.sdk;
233
+ debugger;
232
234
  chainId = chain.chainId + '';
233
235
  if (!chain) return [3 /*break*/, 23];
234
236
  rpcUrls = chain.rpcUrls, blockExplorerUrl = chain.blockExplorerUrl, nativeCurrency = chain.nativeCurrency, chainName = chain.chainName;
@@ -79,6 +79,7 @@ var BitgetWallet = /** @class */ (function (_super) {
79
79
  types_1.EnumChains.XDai,
80
80
  types_1.EnumChains.HECO,
81
81
  types_1.EnumChains.Fantom,
82
+ types_1.EnumChains.Sonic,
82
83
  types_1.EnumChains.Avalanche,
83
84
  types_1.EnumChains.Arbitrum,
84
85
  types_1.EnumChains.Optimism,
@@ -79,6 +79,7 @@ var BlockWallet = /** @class */ (function (_super) {
79
79
  types_1.EnumChains.Polygon,
80
80
  types_1.EnumChains.Avalanche,
81
81
  types_1.EnumChains.Fantom,
82
+ types_1.EnumChains.Sonic,
82
83
  types_1.EnumChains.XDai,
83
84
  types_1.EnumChains.ZKSYNC,
84
85
  types_1.EnumChains.PolygonzkEVM,
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
30
30
  }) : function(o, v) {
31
31
  o["default"] = v;
32
32
  });
33
- var __importStar = (this && this.__importStar) || function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
33
+ var __importStar = (this && this.__importStar) || (function () {
34
+ var ownKeys = function(o) {
35
+ ownKeys = Object.getOwnPropertyNames || function (o) {
36
+ var ar = [];
37
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
38
+ return ar;
39
+ };
40
+ return ownKeys(o);
41
+ };
42
+ return function (mod) {
43
+ if (mod && mod.__esModule) return mod;
44
+ var result = {};
45
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
46
+ __setModuleDefault(result, mod);
47
+ return result;
48
+ };
49
+ })();
40
50
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
41
51
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
42
52
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -81,6 +81,7 @@ var BraveWallet = /** @class */ (function (_super) {
81
81
  types_1.EnumChains.XDai,
82
82
  types_1.EnumChains.HECO,
83
83
  types_1.EnumChains.Fantom,
84
+ types_1.EnumChains.Sonic,
84
85
  types_1.EnumChains.Avalanche,
85
86
  types_1.EnumChains.Arbitrum,
86
87
  types_1.EnumChains.Optimism,
@@ -77,6 +77,7 @@ var CoinbaseWallet = /** @class */ (function (_super) {
77
77
  types_1.EnumChains.Polygon,
78
78
  types_1.EnumChains.XDai,
79
79
  types_1.EnumChains.Fantom,
80
+ types_1.EnumChains.Sonic,
80
81
  types_1.EnumChains.Avalanche,
81
82
  types_1.EnumChains.Arbitrum,
82
83
  types_1.EnumChains.Optimism,
@@ -77,6 +77,7 @@ var CompassWallet = /** @class */ (function (_super) {
77
77
  types_1.EnumChains.Polygon,
78
78
  types_1.EnumChains.XDai,
79
79
  types_1.EnumChains.Fantom,
80
+ types_1.EnumChains.Sonic,
80
81
  types_1.EnumChains.Avalanche,
81
82
  types_1.EnumChains.Arbitrum,
82
83
  types_1.EnumChains.Optimism,
@@ -79,6 +79,7 @@ var ImTokenWallet = /** @class */ (function (_super) {
79
79
  types_1.EnumChains.XDai,
80
80
  types_1.EnumChains.HECO,
81
81
  types_1.EnumChains.Fantom,
82
+ types_1.EnumChains.Sonic,
82
83
  types_1.EnumChains.Avalanche,
83
84
  types_1.EnumChains.ZKSYNC,
84
85
  types_1.EnumChains.Linea,
@@ -77,6 +77,7 @@ var Krystal = /** @class */ (function (_super) {
77
77
  types_1.EnumChains.BSC,
78
78
  types_1.EnumChains.Polygon,
79
79
  types_1.EnumChains.Fantom,
80
+ types_1.EnumChains.Sonic,
80
81
  types_1.EnumChains.Avalanche,
81
82
  types_1.EnumChains.Arbitrum,
82
83
  types_1.EnumChains.Optimism
@@ -1,6 +1,6 @@
1
1
  import { EnumChains, EnumWalletName, EnumWalletType } from "../types";
2
2
  import BaseWallet from "./BaseWallet";
3
- import Web3 from 'web3';
3
+ import Web3 from "web3";
4
4
  declare class MathWallet extends BaseWallet {
5
5
  name: EnumWalletName;
6
6
  icon: any;
@@ -71,7 +71,17 @@ var MathWallet = /** @class */ (function (_super) {
71
71
  var _this = _super !== null && _super.apply(this, arguments) || this;
72
72
  _this.name = types_1.EnumWalletName.MathWallet;
73
73
  _this.icon = math_svg_1.default;
74
- _this.supportChains = [types_1.EnumChains.ETH, types_1.EnumChains.BSC, types_1.EnumChains.HECO, types_1.EnumChains.Fantom, types_1.EnumChains.OKEX, types_1.EnumChains.XDai, types_1.EnumChains.Arbitrum, types_1.EnumChains.Optimism];
74
+ _this.supportChains = [
75
+ types_1.EnumChains.ETH,
76
+ types_1.EnumChains.BSC,
77
+ types_1.EnumChains.HECO,
78
+ types_1.EnumChains.Fantom,
79
+ types_1.EnumChains.Sonic,
80
+ types_1.EnumChains.OKEX,
81
+ types_1.EnumChains.XDai,
82
+ types_1.EnumChains.Arbitrum,
83
+ types_1.EnumChains.Optimism,
84
+ ];
75
85
  _this.type = types_1.EnumWalletType.Extension;
76
86
  _this.sdk = null;
77
87
  _this.installUrl = "https://chrome.google.com/webstore/detail/math-wallet/afbcbjpbpfadlkmhmclhkeeodmamcflc";
@@ -82,6 +82,7 @@ var MetaMask = /** @class */ (function (_super) {
82
82
  types_1.EnumChains.XDai,
83
83
  types_1.EnumChains.HECO,
84
84
  types_1.EnumChains.Fantom,
85
+ types_1.EnumChains.Sonic,
85
86
  types_1.EnumChains.Avalanche,
86
87
  types_1.EnumChains.Arbitrum,
87
88
  types_1.EnumChains.Optimism,
@@ -78,6 +78,7 @@ var OKXWallet = /** @class */ (function (_super) {
78
78
  types_1.EnumChains.Polygon,
79
79
  types_1.EnumChains.Avalanche,
80
80
  types_1.EnumChains.Fantom,
81
+ types_1.EnumChains.Sonic,
81
82
  types_1.EnumChains.Arbitrum,
82
83
  types_1.EnumChains.Optimism,
83
84
  types_1.EnumChains.Cronos,
@@ -76,6 +76,7 @@ var PlenaWallet = /** @class */ (function (_super) {
76
76
  types_1.EnumChains.BSC,
77
77
  types_1.EnumChains.Polygon,
78
78
  types_1.EnumChains.Fantom,
79
+ types_1.EnumChains.Sonic,
79
80
  types_1.EnumChains.Avalanche
80
81
  ];
81
82
  _this.type = types_1.EnumWalletType.WalletConnect;
@@ -77,6 +77,7 @@ var RabbyWallet = /** @class */ (function (_super) {
77
77
  types_1.EnumChains.BSC,
78
78
  types_1.EnumChains.Polygon,
79
79
  types_1.EnumChains.Fantom,
80
+ types_1.EnumChains.Sonic,
80
81
  types_1.EnumChains.Avalanche,
81
82
  types_1.EnumChains.Arbitrum,
82
83
  types_1.EnumChains.Optimism,
@@ -80,6 +80,7 @@ var SafePalWallet = /** @class */ (function (_super) {
80
80
  types_1.EnumChains.XDai,
81
81
  types_1.EnumChains.HECO,
82
82
  types_1.EnumChains.Fantom,
83
+ types_1.EnumChains.Sonic,
83
84
  types_1.EnumChains.Avalanche,
84
85
  types_1.EnumChains.Arbitrum,
85
86
  types_1.EnumChains.Optimism,
@@ -79,6 +79,7 @@ var TrustWallet = /** @class */ (function (_super) {
79
79
  types_1.EnumChains.XDai,
80
80
  types_1.EnumChains.HECO,
81
81
  types_1.EnumChains.Fantom,
82
+ types_1.EnumChains.Sonic,
82
83
  types_1.EnumChains.Avalanche,
83
84
  types_1.EnumChains.Arbitrum,
84
85
  types_1.EnumChains.Optimism,
@@ -84,6 +84,7 @@ var WalletConnect = /** @class */ (function (_super) {
84
84
  types_1.EnumChains.XDai,
85
85
  types_1.EnumChains.HECO,
86
86
  types_1.EnumChains.Fantom,
87
+ types_1.EnumChains.Sonic,
87
88
  types_1.EnumChains.Avalanche,
88
89
  types_1.EnumChains.Arbitrum,
89
90
  types_1.EnumChains.Optimism,
@@ -77,6 +77,7 @@ var ZerionWallet = /** @class */ (function (_super) {
77
77
  types_1.EnumChains.Polygon,
78
78
  types_1.EnumChains.XDai,
79
79
  types_1.EnumChains.Fantom,
80
+ types_1.EnumChains.Sonic,
80
81
  types_1.EnumChains.Avalanche,
81
82
  types_1.EnumChains.Arbitrum,
82
83
  types_1.EnumChains.Optimism,
package/lib/types.d.ts CHANGED
@@ -23,6 +23,7 @@ export declare enum EnumChains {
23
23
  XDai = "xdai",
24
24
  HECO = "heco",
25
25
  Fantom = "fantom",
26
+ Sonic = "sonic",
26
27
  Avalanche = "avax",
27
28
  OKEX = "okex",
28
29
  Arbitrum = "arbitrum",
package/lib/types.js CHANGED
@@ -23,6 +23,7 @@ var EnumChains;
23
23
  EnumChains["XDai"] = "xdai";
24
24
  EnumChains["HECO"] = "heco";
25
25
  EnumChains["Fantom"] = "fantom";
26
+ EnumChains["Sonic"] = "sonic";
26
27
  EnumChains["Avalanche"] = "avax";
27
28
  EnumChains["OKEX"] = "okex";
28
29
  EnumChains["Arbitrum"] = "arbitrum";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/wallet",
3
- "version": "1.10.12",
3
+ "version": "1.10.14",
4
4
  "description": "A multi-chain wallets manager",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -56,8 +56,8 @@
56
56
  "@onflow/fcl": "^0.0.71",
57
57
  "@ont-dev/ontology-dapi": "^0.5.7",
58
58
  "@project-serum/sol-wallet-adapter": "0.2.0",
59
- "@reown/appkit": "1.3.2",
60
- "@reown/appkit-adapter-wagmi": "1.3.2",
59
+ "@reown/appkit": "^1.5.3",
60
+ "@reown/appkit-adapter-wagmi": "^1.5.3",
61
61
  "@siddomains/sidjs": "^0.1.22",
62
62
  "@solana/web3.js": "^1.91.0",
63
63
  "@terra-money/terra.js": "3.1.10",
@@ -72,7 +72,7 @@
72
72
  "starknet": "^4.22.0",
73
73
  "viem": "2.21.44",
74
74
  "wagmi": "2.12.30",
75
- "web3": "^1.7.4",
75
+ "web3": "^1.10.4",
76
76
  "web3-ledgerhq-frame-connector": "^1.1.0"
77
77
  },
78
78
  "eslintConfig": {