@openocean.finance/wallet 1.5.16 → 1.5.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/Wallets/CloverWallet.js +0 -1
- package/lib/Wallets/Coin98.d.ts +3 -3
- package/lib/Wallets/Coin98.js +21 -8
- package/lib/Wallets/CoinbaseWallet.js +1 -0
- package/lib/Wallets/ImTokenWallet.js +2 -1
- package/lib/Wallets/MetaMask.js +1 -0
- package/lib/Wallets/OKXWallet.js +1 -0
- package/lib/Wallets/SafePalWallet.js +2 -1
- package/lib/Wallets/TrustWallet.js +2 -1
- package/lib/types.d.ts +2 -1
- package/lib/types.js +1 -0
- package/package.json +1 -1
package/lib/Wallets/Coin98.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ declare class Coin98 extends BaseWallet {
|
|
|
8
8
|
sdk: any | null;
|
|
9
9
|
installUrl: string;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* connect Coin98 and get wallet address
|
|
12
|
+
* @param chainId specific chainId,throw error when not match
|
|
13
|
+
*/
|
|
14
14
|
requestConnect(chainId?: number): Promise<any>;
|
|
15
15
|
/**
|
|
16
16
|
* connect Coin98 and get wallet address
|
package/lib/Wallets/Coin98.js
CHANGED
|
@@ -72,16 +72,28 @@ var Coin98 = /** @class */ (function (_super) {
|
|
|
72
72
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
73
|
_this.name = types_1.EnumWalletName.Coin98;
|
|
74
74
|
_this.icon = coin98_svg_1.default;
|
|
75
|
-
_this.supportChains = [
|
|
75
|
+
_this.supportChains = [
|
|
76
|
+
types_1.EnumChains.ETH,
|
|
77
|
+
types_1.EnumChains.BSC,
|
|
78
|
+
types_1.EnumChains.Polygon,
|
|
79
|
+
types_1.EnumChains.HECO,
|
|
80
|
+
types_1.EnumChains.XDai,
|
|
81
|
+
types_1.EnumChains.Fantom,
|
|
82
|
+
types_1.EnumChains.Avalanche,
|
|
83
|
+
types_1.EnumChains.Arbitrum,
|
|
84
|
+
types_1.EnumChains.OKEX,
|
|
85
|
+
types_1.EnumChains.Aurora,
|
|
86
|
+
types_1.EnumChains.Scroll,
|
|
87
|
+
];
|
|
76
88
|
_this.type = types_1.EnumWalletType.Extension;
|
|
77
89
|
_this.sdk = null;
|
|
78
90
|
_this.installUrl = "https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg";
|
|
79
91
|
return _this;
|
|
80
92
|
}
|
|
81
93
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
94
|
+
* connect Coin98 and get wallet address
|
|
95
|
+
* @param chainId specific chainId,throw error when not match
|
|
96
|
+
*/
|
|
85
97
|
Coin98.prototype.requestConnect = function (chainId) {
|
|
86
98
|
return __awaiter(this, void 0, void 0, function () {
|
|
87
99
|
var address, currentChainId;
|
|
@@ -120,7 +132,8 @@ var Coin98 = /** @class */ (function (_super) {
|
|
|
120
132
|
return __generator(this, function (_a) {
|
|
121
133
|
switch (_a.label) {
|
|
122
134
|
case 0: return [4 /*yield*/, (0, helper_1.autoWalletCheck)(function () {
|
|
123
|
-
return (window.ethereum && window.ethereum.isCoin98) ||
|
|
135
|
+
return ((window.ethereum && window.ethereum.isCoin98) ||
|
|
136
|
+
(window.coin98 && window.coin98.sol));
|
|
124
137
|
}, 3000)];
|
|
125
138
|
case 1:
|
|
126
139
|
result = _a.sent();
|
|
@@ -128,12 +141,12 @@ var Coin98 = /** @class */ (function (_super) {
|
|
|
128
141
|
throw new Error(types_1.EnumErrors.NoCoin98);
|
|
129
142
|
}
|
|
130
143
|
this.sdk = window.coin98.sol;
|
|
131
|
-
return [4 /*yield*/, this.sdk.request({ method:
|
|
144
|
+
return [4 /*yield*/, this.sdk.request({ method: "sol_accounts" })];
|
|
132
145
|
case 2:
|
|
133
146
|
accounts = _a.sent();
|
|
134
|
-
address = accounts && accounts[0] || "";
|
|
147
|
+
address = (accounts && accounts[0]) || "";
|
|
135
148
|
this.address = address;
|
|
136
|
-
this.chainId =
|
|
149
|
+
this.chainId = "";
|
|
137
150
|
return [2 /*return*/, address];
|
|
138
151
|
}
|
|
139
152
|
});
|
|
@@ -82,7 +82,8 @@ var ImTokenWallet = /** @class */ (function (_super) {
|
|
|
82
82
|
types_1.EnumChains.Avalanche,
|
|
83
83
|
types_1.EnumChains.ZKSYNC,
|
|
84
84
|
types_1.EnumChains.Linea,
|
|
85
|
-
types_1.EnumChains.PolygonzkEVM
|
|
85
|
+
types_1.EnumChains.PolygonzkEVM,
|
|
86
|
+
types_1.EnumChains.Scroll,
|
|
86
87
|
];
|
|
87
88
|
_this.type = types_1.EnumWalletType.Mobile;
|
|
88
89
|
_this.sdk = null;
|
package/lib/Wallets/MetaMask.js
CHANGED
package/lib/Wallets/OKXWallet.js
CHANGED
|
@@ -92,7 +92,8 @@ var SafePalWallet = /** @class */ (function (_super) {
|
|
|
92
92
|
types_1.EnumChains.Klaytn,
|
|
93
93
|
types_1.EnumChains.ZKSYNC,
|
|
94
94
|
types_1.EnumChains.Linea,
|
|
95
|
-
types_1.EnumChains.PolygonzkEVM
|
|
95
|
+
types_1.EnumChains.PolygonzkEVM,
|
|
96
|
+
types_1.EnumChains.Scroll,
|
|
96
97
|
];
|
|
97
98
|
_this.type = types_1.EnumWalletType.Extension;
|
|
98
99
|
_this.sdk = null;
|
|
@@ -92,7 +92,8 @@ var TrustWallet = /** @class */ (function (_super) {
|
|
|
92
92
|
types_1.EnumChains.Klaytn,
|
|
93
93
|
types_1.EnumChains.ZKSYNC,
|
|
94
94
|
types_1.EnumChains.Linea,
|
|
95
|
-
types_1.EnumChains.PolygonzkEVM
|
|
95
|
+
types_1.EnumChains.PolygonzkEVM,
|
|
96
|
+
types_1.EnumChains.Scroll,
|
|
96
97
|
];
|
|
97
98
|
_this.type = types_1.EnumWalletType.Extension;
|
|
98
99
|
_this.sdk = null;
|
package/lib/types.d.ts
CHANGED
package/lib/types.js
CHANGED
|
@@ -46,6 +46,7 @@ var EnumChains;
|
|
|
46
46
|
EnumChains["Linea"] = "linea";
|
|
47
47
|
EnumChains["Starknet"] = "starknet";
|
|
48
48
|
EnumChains["Telos"] = "telos";
|
|
49
|
+
EnumChains["Scroll"] = "scroll";
|
|
49
50
|
})(EnumChains = exports.EnumChains || (exports.EnumChains = {}));
|
|
50
51
|
var EnumWalletType;
|
|
51
52
|
(function (EnumWalletType) {
|