@openocean.finance/wallet 1.6.3 → 1.6.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.
@@ -88,7 +88,7 @@ var HaHaWallet = /** @class */ (function (_super) {
88
88
  HaHaWallet.prototype.requestConnect = function (chainId, config) {
89
89
  if (chainId === void 0) { chainId = 1; }
90
90
  return __awaiter(this, void 0, void 0, function () {
91
- var qrModalOptions, provider, currentChainId, address;
91
+ var qrModalOptions, rpcMap, provider, currentChainId, address;
92
92
  return __generator(this, function (_a) {
93
93
  switch (_a.label) {
94
94
  case 0:
@@ -101,11 +101,21 @@ var HaHaWallet = /** @class */ (function (_super) {
101
101
  '--wcm-z-index': '99999',
102
102
  }
103
103
  };
104
+ rpcMap = {};
104
105
  return [4 /*yield*/, ethereum_provider_1.EthereumProvider.init({
105
106
  projectId: config && config.projectId ? config.projectId : 'c1ca7adc83e89c7e7848440702f28f38',
106
- chains: [chainId],
107
107
  showQrModal: true,
108
- qrModalOptions: qrModalOptions
108
+ // qrModalOptions,
109
+ chains: [chainId],
110
+ optionalChains: config.chainsObj.chainIds,
111
+ rpcMap: rpcMap,
112
+ optionalMethods: [
113
+ 'wallet_addEthereumChain',
114
+ 'wallet_switchEthereumChain',
115
+ "eth_signTypedData",
116
+ "eth_signTypedData_v4",
117
+ "eth_sign"
118
+ ]
109
119
  })];
110
120
  case 1:
111
121
  provider = _a.sent();
@@ -93,7 +93,7 @@ var Krystal = /** @class */ (function (_super) {
93
93
  Krystal.prototype.requestConnect = function (chainId, config) {
94
94
  if (chainId === void 0) { chainId = 1; }
95
95
  return __awaiter(this, void 0, void 0, function () {
96
- var qrModalOptions, provider, currentChainId, address;
96
+ var qrModalOptions, rpcMap, provider, currentChainId, address;
97
97
  return __generator(this, function (_a) {
98
98
  switch (_a.label) {
99
99
  case 0:
@@ -106,11 +106,21 @@ var Krystal = /** @class */ (function (_super) {
106
106
  '--wcm-z-index': '99999',
107
107
  }
108
108
  };
109
+ rpcMap = {};
109
110
  return [4 /*yield*/, ethereum_provider_1.EthereumProvider.init({
110
- projectId: 'c1ca7adc83e89c7e7848440702f28f38',
111
- chains: [chainId],
111
+ projectId: config && config.projectId ? config.projectId : 'c1ca7adc83e89c7e7848440702f28f38',
112
112
  showQrModal: true,
113
- qrModalOptions: qrModalOptions
113
+ // qrModalOptions,
114
+ chains: [chainId],
115
+ optionalChains: config.chainsObj.chainIds,
116
+ rpcMap: rpcMap,
117
+ optionalMethods: [
118
+ 'wallet_addEthereumChain',
119
+ 'wallet_switchEthereumChain',
120
+ "eth_signTypedData",
121
+ "eth_signTypedData_v4",
122
+ "eth_sign"
123
+ ]
114
124
  })];
115
125
  case 1:
116
126
  provider = _a.sent();
@@ -90,7 +90,7 @@ var PlenaWallet = /** @class */ (function (_super) {
90
90
  PlenaWallet.prototype.requestConnect = function (chainId, config) {
91
91
  if (chainId === void 0) { chainId = 1; }
92
92
  return __awaiter(this, void 0, void 0, function () {
93
- var qrModalOptions, provider, currentChainId, address;
93
+ var qrModalOptions, rpcMap, provider, currentChainId, address;
94
94
  return __generator(this, function (_a) {
95
95
  switch (_a.label) {
96
96
  case 0:
@@ -103,11 +103,21 @@ var PlenaWallet = /** @class */ (function (_super) {
103
103
  '--wcm-z-index': '99999',
104
104
  }
105
105
  };
106
+ rpcMap = {};
106
107
  return [4 /*yield*/, ethereum_provider_1.EthereumProvider.init({
107
108
  projectId: config && config.projectId ? config.projectId : 'c1ca7adc83e89c7e7848440702f28f38',
108
- chains: [chainId],
109
109
  showQrModal: true,
110
- qrModalOptions: qrModalOptions
110
+ // qrModalOptions,
111
+ chains: [chainId],
112
+ optionalChains: config.chainsObj.chainIds,
113
+ rpcMap: rpcMap,
114
+ optionalMethods: [
115
+ 'wallet_addEthereumChain',
116
+ 'wallet_switchEthereumChain',
117
+ "eth_signTypedData",
118
+ "eth_signTypedData_v4",
119
+ "eth_sign"
120
+ ]
111
121
  })];
112
122
  case 1:
113
123
  provider = _a.sent();
@@ -133,7 +133,13 @@ var WalletConnect = /** @class */ (function (_super) {
133
133
  chains: [chainId],
134
134
  optionalChains: config.chainsObj.chainIds,
135
135
  rpcMap: rpcMap,
136
- optionalMethods: ['wallet_addEthereumChain', 'wallet_switchEthereumChain']
136
+ optionalMethods: [
137
+ 'wallet_addEthereumChain',
138
+ 'wallet_switchEthereumChain',
139
+ "eth_signTypedData",
140
+ "eth_signTypedData_v4",
141
+ "eth_sign"
142
+ ]
137
143
  })];
138
144
  case 1:
139
145
  provider = _a.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/wallet",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "A multi-chain wallets manager",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {