@openocean.finance/wallet 1.9.0 → 1.9.2

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
@@ -40,7 +40,7 @@ var chainObj = {
40
40
  "polygon": {
41
41
  compiler: 'EVM',
42
42
  chainName: "Polygon Mainnet", chainId: 137, blockExplorerUrl: "https://polygonscan.com/tx/", popularToken: ["USDT", "USDC", "MATIC", "AAVE", "DINO", "ADDY", "MIMATIC"], nativeCurrency: { name: "MATIC", symbol: "MATIC", decimals: 18, address: "0x0000000000000000000000000000000000001010" },
43
- rpcUrls: ["https://rpc-mainnet.maticvigil.com"]
43
+ rpcUrls: ["https://polygon.llamarpc.com"]
44
44
  },
45
45
  "polygon_zkevm": {
46
46
  compiler: 'EVM',
@@ -8,6 +8,7 @@ interface ReqConnectWalletVo {
8
8
  noSwitch?: boolean;
9
9
  provider?: any;
10
10
  projectId?: string;
11
+ rpcUrl?: string;
11
12
  }
12
13
  interface Wallet extends BaseWallet {
13
14
  }
@@ -152,7 +152,7 @@ function link(reqConnectWalletVo, chain) {
152
152
  // https://solana-api.projectserum.com
153
153
  // https://mercuria-fronten-1cd8.mainnet.rpcpool.com/
154
154
  // "https://rpc.ankr.com/solana/ad9d7bb3250b29d691330e63e3b46778099aca307af8f5e49b2ebc0a470dd848"
155
- wallet.connection = new web3_js_1.Connection("https://solana-mainnet.g.alchemy.com/v2/O2uK_K8FGzQeuRZyI2msw2EgwIGqNoHP"
155
+ wallet.connection = new web3_js_1.Connection(reqConnectWalletVo.localRpcUrl || "https://solana-mainnet.rpc.grove.city/v1/3db25afe"
156
156
  // "https://few-silent-choice.solana-mainnet.quiknode.pro/b37eb00eb03a5a5e0ae9d9b7cf535b0b9c0dd6a9/"
157
157
  );
158
158
  if (res) {
@@ -366,7 +366,7 @@ function tryWalletConnect(reqConnectWalletVo) {
366
366
  case 5:
367
367
  localProvider = '';
368
368
  localRpcUrl = '';
369
- if (!wallet) return [3 /*break*/, 7];
369
+ if (!(wallet && chain.compiler == 'EVM')) return [3 /*break*/, 7];
370
370
  if (reqConnectWalletVo.localRpcUrl) {
371
371
  localProvider = new web3_1.default(new web3_1.default.providers.HttpProvider(reqConnectWalletVo.localRpcUrl));
372
372
  localRpcUrl = reqConnectWalletVo.localRpcUrl;
package/lib/types.js CHANGED
@@ -60,14 +60,14 @@ var EnumChains;
60
60
  EnumChains["Rootstock"] = "rootstock";
61
61
  EnumChains["Sei"] = "sei";
62
62
  EnumChains["Btc"] = "btc";
63
- })(EnumChains || (exports.EnumChains = EnumChains = {}));
63
+ })(EnumChains = exports.EnumChains || (exports.EnumChains = {}));
64
64
  var EnumWalletType;
65
65
  (function (EnumWalletType) {
66
66
  EnumWalletType["Extension"] = "Extension";
67
67
  EnumWalletType["WalletConnect"] = "WalletConnect";
68
68
  EnumWalletType["Web"] = "Web";
69
69
  EnumWalletType["Mobile"] = "Mobile";
70
- })(EnumWalletType || (exports.EnumWalletType = EnumWalletType = {}));
70
+ })(EnumWalletType = exports.EnumWalletType || (exports.EnumWalletType = {}));
71
71
  var EnumWalletName;
72
72
  (function (EnumWalletName) {
73
73
  EnumWalletName["NearWallet"] = "NearWallet";
@@ -123,7 +123,7 @@ var EnumWalletName;
123
123
  EnumWalletName["CompassWallet"] = "Compass Wallet";
124
124
  EnumWalletName["OKXBtcWallet"] = "OKX Wallet";
125
125
  EnumWalletName["UnisatWallet"] = "Unisat Wallet";
126
- })(EnumWalletName || (exports.EnumWalletName = EnumWalletName = {}));
126
+ })(EnumWalletName = exports.EnumWalletName || (exports.EnumWalletName = {}));
127
127
  var EnumErrors;
128
128
  (function (EnumErrors) {
129
129
  EnumErrors["NotMetamask"] = "40001";
@@ -174,4 +174,4 @@ var EnumErrors;
174
174
  EnumErrors["NotCompassWallet"] = "40048";
175
175
  EnumErrors["NotOkxBtxWallet"] = "40049";
176
176
  EnumErrors["NotUnisatWallet"] = "40050";
177
- })(EnumErrors || (exports.EnumErrors = EnumErrors = {}));
177
+ })(EnumErrors = exports.EnumErrors || (exports.EnumErrors = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/wallet",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "A multi-chain wallets manager",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
Binary file