@subwallet/extension-base 1.1.2-1 → 1.1.3-0
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/background/KoniTypes.d.ts +18 -0
- package/background/KoniTypes.js +2 -1
- package/cjs/background/KoniTypes.js +4 -2
- package/cjs/koni/api/dotsama/transfer.js +0 -2
- package/cjs/koni/background/handlers/Extension.js +179 -120
- package/cjs/koni/background/handlers/State.js +73 -48
- package/cjs/packageInfo.js +1 -1
- package/cjs/services/chain-service/constants.js +2 -1
- package/cjs/services/chain-service/handler/SubstrateApi.js +8 -0
- package/cjs/services/chain-service/handler/manta/MantaPrivateHandler.js +1 -1
- package/cjs/services/chain-service/handler/manta/manta-extension-sdk-empty.js +13 -0
- package/cjs/services/chain-service/index.js +11 -6
- package/cjs/services/request-service/handler/PopupHandler.js +2 -2
- package/cjs/services/request-service/helper/index.js +2 -26
- package/cjs/services/storage-service/db-stores/Metadata.js +1 -1
- package/cjs/services/wallet-connect-service/constants.js +8 -5
- package/cjs/services/wallet-connect-service/index.js +50 -36
- package/cjs/utils/environment.js +32 -2
- package/cjs/utils/index.js +21 -5
- package/cjs/utils/registry.js +25 -0
- package/koni/api/dotsama/transfer.js +0 -2
- package/koni/background/handlers/Extension.d.ts +2 -0
- package/koni/background/handlers/Extension.js +72 -15
- package/koni/background/handlers/State.d.ts +7 -2
- package/koni/background/handlers/State.js +73 -48
- package/package.json +17 -6
- package/packageInfo.js +1 -1
- package/services/chain-service/constants.d.ts +1 -0
- package/services/chain-service/constants.js +2 -1
- package/services/chain-service/handler/SubstrateApi.js +8 -0
- package/services/chain-service/handler/manta/MantaPrivateHandler.d.ts +1 -1
- package/services/chain-service/handler/manta/MantaPrivateHandler.js +1 -1
- package/services/chain-service/handler/manta/manta-extension-sdk-empty.d.ts +4 -0
- package/services/chain-service/handler/manta/manta-extension-sdk-empty.js +5 -0
- package/services/chain-service/index.d.ts +2 -1
- package/services/chain-service/index.js +11 -6
- package/services/request-service/handler/PopupHandler.js +1 -1
- package/services/request-service/helper/index.d.ts +0 -2
- package/services/request-service/helper/index.js +0 -23
- package/services/request-service/types.d.ts +0 -1
- package/services/storage-service/db-stores/Metadata.js +1 -1
- package/services/wallet-connect-service/constants.d.ts +2 -1
- package/services/wallet-connect-service/constants.js +5 -3
- package/services/wallet-connect-service/index.d.ts +0 -1
- package/services/wallet-connect-service/index.js +50 -36
- package/utils/environment.d.ts +4 -1
- package/utils/environment.js +28 -1
- package/utils/index.d.ts +2 -0
- package/utils/index.js +4 -1
- package/utils/registry.d.ts +4 -0
- package/utils/registry.js +18 -0
|
@@ -18,6 +18,7 @@ var _eip155RequestHandler = /*#__PURE__*/_classPrivateFieldLooseKey("eip155Reque
|
|
|
18
18
|
var _koniState = /*#__PURE__*/_classPrivateFieldLooseKey("koniState");
|
|
19
19
|
var _client = /*#__PURE__*/_classPrivateFieldLooseKey("client");
|
|
20
20
|
var _option = /*#__PURE__*/_classPrivateFieldLooseKey("option");
|
|
21
|
+
var _haveData = /*#__PURE__*/_classPrivateFieldLooseKey("haveData");
|
|
21
22
|
var _initClient = /*#__PURE__*/_classPrivateFieldLooseKey("initClient");
|
|
22
23
|
var _updateSessions = /*#__PURE__*/_classPrivateFieldLooseKey("updateSessions");
|
|
23
24
|
var _onSessionProposal = /*#__PURE__*/_classPrivateFieldLooseKey("onSessionProposal");
|
|
@@ -48,6 +49,10 @@ export default class WalletConnectService {
|
|
|
48
49
|
Object.defineProperty(this, _initClient, {
|
|
49
50
|
value: _initClient2
|
|
50
51
|
});
|
|
52
|
+
Object.defineProperty(this, _haveData, {
|
|
53
|
+
get: _get_haveData,
|
|
54
|
+
set: void 0
|
|
55
|
+
});
|
|
51
56
|
Object.defineProperty(this, _requestService, {
|
|
52
57
|
writable: true,
|
|
53
58
|
value: void 0
|
|
@@ -97,66 +102,64 @@ export default class WalletConnectService {
|
|
|
97
102
|
_classPrivateFieldLooseBase(this, _option)[_option] = Object.assign({}, _classPrivateFieldLooseBase(this, _option)[_option], newOption);
|
|
98
103
|
await _classPrivateFieldLooseBase(this, _initClient)[_initClient]();
|
|
99
104
|
}
|
|
100
|
-
getSessions() {
|
|
101
|
-
var _classPrivateFieldLoo3;
|
|
102
|
-
_classPrivateFieldLooseBase(this, _checkClient)[_checkClient]();
|
|
103
|
-
console.log((_classPrivateFieldLoo3 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo3 === void 0 ? void 0 : _classPrivateFieldLoo3.session.values);
|
|
104
|
-
}
|
|
105
105
|
async connect(uri) {
|
|
106
|
-
var
|
|
106
|
+
var _classPrivateFieldLoo3;
|
|
107
|
+
if (!_classPrivateFieldLooseBase(this, _haveData)[_haveData]) {
|
|
108
|
+
await _classPrivateFieldLooseBase(this, _initClient)[_initClient](true);
|
|
109
|
+
}
|
|
107
110
|
_classPrivateFieldLooseBase(this, _checkClient)[_checkClient]();
|
|
108
|
-
await ((
|
|
111
|
+
await ((_classPrivateFieldLoo3 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo3 === void 0 ? void 0 : _classPrivateFieldLoo3.pair({
|
|
109
112
|
uri
|
|
110
113
|
}));
|
|
111
114
|
}
|
|
112
115
|
async approveSession(result) {
|
|
113
|
-
var
|
|
116
|
+
var _classPrivateFieldLoo4;
|
|
114
117
|
_classPrivateFieldLooseBase(this, _checkClient)[_checkClient]();
|
|
115
|
-
await ((
|
|
118
|
+
await ((_classPrivateFieldLoo4 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo4 === void 0 ? void 0 : _classPrivateFieldLoo4.approve(result));
|
|
116
119
|
_classPrivateFieldLooseBase(this, _updateSessions)[_updateSessions]();
|
|
117
120
|
}
|
|
118
121
|
async rejectSession(id) {
|
|
119
|
-
var
|
|
122
|
+
var _classPrivateFieldLoo5;
|
|
120
123
|
_classPrivateFieldLooseBase(this, _checkClient)[_checkClient]();
|
|
121
|
-
await ((
|
|
124
|
+
await ((_classPrivateFieldLoo5 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo5 === void 0 ? void 0 : _classPrivateFieldLoo5.reject({
|
|
122
125
|
id: id,
|
|
123
126
|
reason: getSdkError('USER_REJECTED')
|
|
124
127
|
}));
|
|
125
128
|
}
|
|
126
129
|
async responseRequest(response) {
|
|
127
|
-
var
|
|
130
|
+
var _classPrivateFieldLoo6;
|
|
128
131
|
_classPrivateFieldLooseBase(this, _checkClient)[_checkClient]();
|
|
129
|
-
await ((
|
|
132
|
+
await ((_classPrivateFieldLoo6 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo6 === void 0 ? void 0 : _classPrivateFieldLoo6.respond(response));
|
|
130
133
|
}
|
|
131
134
|
async resetWallet(resetAll) {
|
|
132
|
-
var
|
|
135
|
+
var _classPrivateFieldLoo7, _classPrivateFieldLoo9, _classPrivateFieldLoo11;
|
|
133
136
|
_classPrivateFieldLooseBase(this, _removeListener)[_removeListener]();
|
|
134
137
|
|
|
135
138
|
// Disconnect session
|
|
136
|
-
const sessions = ((
|
|
139
|
+
const sessions = ((_classPrivateFieldLoo7 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo7 === void 0 ? void 0 : _classPrivateFieldLoo7.session.values) || [];
|
|
137
140
|
for (const session of sessions) {
|
|
138
|
-
var
|
|
139
|
-
(
|
|
141
|
+
var _classPrivateFieldLoo8;
|
|
142
|
+
(_classPrivateFieldLoo8 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo8 === void 0 ? void 0 : _classPrivateFieldLoo8.disconnect({
|
|
140
143
|
topic: session.topic,
|
|
141
144
|
reason: getSdkError('USER_DISCONNECTED')
|
|
142
145
|
}).catch(console.error);
|
|
143
146
|
}
|
|
144
147
|
|
|
145
148
|
// Disconnect pair
|
|
146
|
-
const pairs = ((
|
|
149
|
+
const pairs = ((_classPrivateFieldLoo9 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo9 === void 0 ? void 0 : _classPrivateFieldLoo9.pairing.values) || [];
|
|
147
150
|
for (const pair of pairs) {
|
|
148
|
-
var
|
|
149
|
-
(
|
|
151
|
+
var _classPrivateFieldLoo10;
|
|
152
|
+
(_classPrivateFieldLoo10 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo10 === void 0 ? void 0 : _classPrivateFieldLoo10.disconnect({
|
|
150
153
|
topic: pair.topic,
|
|
151
154
|
reason: getSdkError('USER_DISCONNECTED')
|
|
152
155
|
}).catch(console.error);
|
|
153
156
|
}
|
|
154
|
-
const keys = (await ((
|
|
157
|
+
const keys = (await ((_classPrivateFieldLoo11 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo11 === void 0 ? void 0 : _classPrivateFieldLoo11.core.storage.getKeys())) || [];
|
|
155
158
|
const deleteKeys = resetAll ? keys : keys.filter(key => key.startsWith('wc@'));
|
|
156
159
|
for (const key of deleteKeys) {
|
|
157
160
|
try {
|
|
158
|
-
var
|
|
159
|
-
await ((
|
|
161
|
+
var _classPrivateFieldLoo12;
|
|
162
|
+
await ((_classPrivateFieldLoo12 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo12 === void 0 ? void 0 : _classPrivateFieldLoo12.core.storage.removeItem(key));
|
|
160
163
|
} catch (e) {
|
|
161
164
|
console.error(e);
|
|
162
165
|
}
|
|
@@ -164,17 +167,28 @@ export default class WalletConnectService {
|
|
|
164
167
|
await _classPrivateFieldLooseBase(this, _initClient)[_initClient]();
|
|
165
168
|
}
|
|
166
169
|
async disconnect(topic) {
|
|
167
|
-
var
|
|
168
|
-
await ((
|
|
170
|
+
var _classPrivateFieldLoo13;
|
|
171
|
+
await ((_classPrivateFieldLoo13 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo13 === void 0 ? void 0 : _classPrivateFieldLoo13.disconnect({
|
|
169
172
|
topic: topic,
|
|
170
173
|
reason: getSdkError('USER_DISCONNECTED')
|
|
171
174
|
}));
|
|
172
175
|
_classPrivateFieldLooseBase(this, _updateSessions)[_updateSessions]();
|
|
173
176
|
}
|
|
174
177
|
}
|
|
175
|
-
|
|
178
|
+
function _get_haveData() {
|
|
179
|
+
const sessionStorage = localStorage.getItem('wc@2:client:0.3//session');
|
|
180
|
+
const pairingStorage = localStorage.getItem('wc@2:core:0.3//pairing');
|
|
181
|
+
const subscriptionStorage = localStorage.getItem('wc@2:core:0.3//subscription');
|
|
182
|
+
const sessions = sessionStorage ? JSON.parse(sessionStorage) : [];
|
|
183
|
+
const pairings = pairingStorage ? JSON.parse(pairingStorage) : [];
|
|
184
|
+
const subscriptions = subscriptionStorage ? JSON.parse(subscriptionStorage) : [];
|
|
185
|
+
return !!sessions.length || !!pairings.length || !!subscriptions.length;
|
|
186
|
+
}
|
|
187
|
+
async function _initClient2(force) {
|
|
176
188
|
_classPrivateFieldLooseBase(this, _removeListener)[_removeListener]();
|
|
177
|
-
|
|
189
|
+
if (force || _classPrivateFieldLooseBase(this, _haveData)[_haveData]) {
|
|
190
|
+
_classPrivateFieldLooseBase(this, _client)[_client] = await SignClient.init(_classPrivateFieldLooseBase(this, _option)[_option]);
|
|
191
|
+
}
|
|
178
192
|
_classPrivateFieldLooseBase(this, _updateSessions)[_updateSessions]();
|
|
179
193
|
_classPrivateFieldLooseBase(this, _createListener)[_createListener]();
|
|
180
194
|
}
|
|
@@ -244,18 +258,18 @@ function _onSessionRequest2(requestEvent) {
|
|
|
244
258
|
}
|
|
245
259
|
}
|
|
246
260
|
function _createListener2() {
|
|
247
|
-
var _classPrivateFieldLoo15, _classPrivateFieldLoo16, _classPrivateFieldLoo17, _classPrivateFieldLoo18, _classPrivateFieldLoo19
|
|
248
|
-
(
|
|
249
|
-
(
|
|
250
|
-
(
|
|
251
|
-
(
|
|
252
|
-
(
|
|
253
|
-
(
|
|
261
|
+
var _classPrivateFieldLoo14, _classPrivateFieldLoo15, _classPrivateFieldLoo16, _classPrivateFieldLoo17, _classPrivateFieldLoo18, _classPrivateFieldLoo19;
|
|
262
|
+
(_classPrivateFieldLoo14 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo14 === void 0 ? void 0 : _classPrivateFieldLoo14.on('session_proposal', _classPrivateFieldLooseBase(this, _onSessionProposal)[_onSessionProposal].bind(this));
|
|
263
|
+
(_classPrivateFieldLoo15 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo15 === void 0 ? void 0 : _classPrivateFieldLoo15.on('session_request', _classPrivateFieldLooseBase(this, _onSessionRequest)[_onSessionRequest].bind(this));
|
|
264
|
+
(_classPrivateFieldLoo16 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo16 === void 0 ? void 0 : _classPrivateFieldLoo16.on('session_ping', data => console.log('ping', data));
|
|
265
|
+
(_classPrivateFieldLoo17 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo17 === void 0 ? void 0 : _classPrivateFieldLoo17.on('session_event', data => console.log('event', data));
|
|
266
|
+
(_classPrivateFieldLoo18 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo18 === void 0 ? void 0 : _classPrivateFieldLoo18.on('session_update', data => console.log('update', data));
|
|
267
|
+
(_classPrivateFieldLoo19 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo19 === void 0 ? void 0 : _classPrivateFieldLoo19.on('session_delete', _classPrivateFieldLooseBase(this, _updateSessions)[_updateSessions].bind(this));
|
|
254
268
|
}
|
|
255
269
|
function _removeListener2() {
|
|
256
270
|
ALL_WALLET_CONNECT_EVENT.forEach(event => {
|
|
257
|
-
var
|
|
258
|
-
(
|
|
271
|
+
var _classPrivateFieldLoo20;
|
|
272
|
+
(_classPrivateFieldLoo20 = _classPrivateFieldLooseBase(this, _client)[_client]) === null || _classPrivateFieldLoo20 === void 0 ? void 0 : _classPrivateFieldLoo20.removeAllListeners(event);
|
|
259
273
|
});
|
|
260
274
|
}
|
|
261
275
|
function _checkClient2() {
|
package/utils/environment.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { RuntimeEnvironmentInfo } from '../background/KoniTypes';
|
|
1
|
+
import { EnvironmentSupport, OSType, RuntimeEnvironmentInfo, TargetEnvironment } from '../background/KoniTypes';
|
|
2
2
|
export declare const RuntimeInfo: RuntimeEnvironmentInfo;
|
|
3
|
+
export declare const getOS: () => OSType;
|
|
4
|
+
export declare const TARGET_ENV: TargetEnvironment;
|
|
5
|
+
export declare const MODULE_SUPPORT: EnvironmentSupport;
|
package/utils/environment.js
CHANGED
|
@@ -56,4 +56,31 @@ function detectRuntimeEnvironment() {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
export const RuntimeInfo = detectRuntimeEnvironment();
|
|
59
|
+
export const RuntimeInfo = detectRuntimeEnvironment();
|
|
60
|
+
export const getOS = () => {
|
|
61
|
+
var _window$navigator, _window$navigator$use;
|
|
62
|
+
const userAgent = window.navigator.userAgent;
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
|
|
65
|
+
const platform = ((_window$navigator = window.navigator) === null || _window$navigator === void 0 ? void 0 : (_window$navigator$use = _window$navigator.userAgentData) === null || _window$navigator$use === void 0 ? void 0 : _window$navigator$use.platform) || window.navigator.platform;
|
|
66
|
+
const macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];
|
|
67
|
+
const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];
|
|
68
|
+
const iosPlatforms = ['iPhone', 'iPad', 'iPod'];
|
|
69
|
+
let os = 'Unknown';
|
|
70
|
+
if (macosPlatforms.indexOf(platform) !== -1) {
|
|
71
|
+
os = 'Mac OS';
|
|
72
|
+
} else if (iosPlatforms.indexOf(platform) !== -1) {
|
|
73
|
+
os = 'iOS';
|
|
74
|
+
} else if (windowsPlatforms.indexOf(platform) !== -1) {
|
|
75
|
+
os = 'Windows';
|
|
76
|
+
} else if (/Android/.test(userAgent)) {
|
|
77
|
+
os = 'Android';
|
|
78
|
+
} else if (/Linux/.test(platform)) {
|
|
79
|
+
os = 'Linux';
|
|
80
|
+
}
|
|
81
|
+
return os;
|
|
82
|
+
};
|
|
83
|
+
export const TARGET_ENV = process.env.TARGET_ENV || 'extension';
|
|
84
|
+
export const MODULE_SUPPORT = {
|
|
85
|
+
MANTA_ZK: TARGET_ENV === 'extension'
|
|
86
|
+
};
|
package/utils/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const isDef: (x: any) => boolean;
|
|
|
8
8
|
export declare const nonEmptyArr: (x: any) => boolean;
|
|
9
9
|
export declare const isEmptyArray: (x: any) => boolean;
|
|
10
10
|
export declare function isAccountAll(address?: string): boolean;
|
|
11
|
+
export declare const isMobile: boolean;
|
|
11
12
|
export declare function reformatAddress(address: string, networkPrefix?: number, isEthereum?: boolean): string;
|
|
12
13
|
export declare function filterAddressByNetworkKey(addresses: string[], networkKey: string, isEthereum?: boolean): string[];
|
|
13
14
|
export declare function categoryAddresses(addresses: string[]): string[][];
|
|
@@ -41,4 +42,5 @@ export declare const stripUrl: (url: string) => string;
|
|
|
41
42
|
export * from './array';
|
|
42
43
|
export * from './environment';
|
|
43
44
|
export * from './lazy';
|
|
45
|
+
export * from './registry';
|
|
44
46
|
export * from './translate';
|
package/utils/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Copyright 2019-2022 @subwallet/extension-base authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { CrowdloanParaState } from '@subwallet/extension-base/background/KoniTypes';
|
|
4
|
+
import { CrowdloanParaState, MobileOS } from '@subwallet/extension-base/background/KoniTypes';
|
|
5
5
|
import { ALL_ACCOUNT_KEY } from '@subwallet/extension-base/constants';
|
|
6
|
+
import { getOS } from '@subwallet/extension-base/utils/environment';
|
|
6
7
|
import { assert, BN, hexToU8a, isHex } from '@polkadot/util';
|
|
7
8
|
import { decodeAddress, encodeAddress, ethereumEncode, isEthereumAddress } from '@polkadot/util-crypto';
|
|
8
9
|
export { canDerive } from "./canDerive.js";
|
|
@@ -13,6 +14,7 @@ export const isEmptyArray = x => !Array.isArray(x) || Array.isArray(x) && x.leng
|
|
|
13
14
|
export function isAccountAll(address) {
|
|
14
15
|
return address === ALL_ACCOUNT_KEY;
|
|
15
16
|
}
|
|
17
|
+
export const isMobile = MobileOS.includes(getOS());
|
|
16
18
|
export function reformatAddress(address, networkPrefix = 42, isEthereum = false) {
|
|
17
19
|
try {
|
|
18
20
|
if (!address || address === '') {
|
|
@@ -287,4 +289,5 @@ export const stripUrl = url => {
|
|
|
287
289
|
export * from "./array.js";
|
|
288
290
|
export * from "./environment.js";
|
|
289
291
|
export * from "./lazy.js";
|
|
292
|
+
export * from "./registry.js";
|
|
290
293
|
export * from "./translate.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2019-2022 @subwallet/extension-base
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { _getChainNativeTokenBasicInfo } from '@subwallet/extension-base/services/chain-service/utils';
|
|
5
|
+
import { Metadata, TypeRegistry } from '@polkadot/types';
|
|
6
|
+
export const createRegistry = (chain, rawMetadata) => {
|
|
7
|
+
var _chain$substrateInfo;
|
|
8
|
+
const registry = new TypeRegistry();
|
|
9
|
+
const metadata = new Metadata(registry, rawMetadata);
|
|
10
|
+
registry.setMetadata(metadata);
|
|
11
|
+
const tokenInfo = _getChainNativeTokenBasicInfo(chain);
|
|
12
|
+
registry.setChainProperties(registry.createType('ChainProperties', {
|
|
13
|
+
ss58Format: ((_chain$substrateInfo = chain.substrateInfo) === null || _chain$substrateInfo === void 0 ? void 0 : _chain$substrateInfo.addressPrefix) || 42,
|
|
14
|
+
tokenDecimals: tokenInfo.decimals,
|
|
15
|
+
tokenSymbol: tokenInfo.symbol
|
|
16
|
+
}));
|
|
17
|
+
return registry;
|
|
18
|
+
};
|