@rabby-wallet/rabby-action 0.1.5 → 0.1.8
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.
|
@@ -53,7 +53,34 @@ export const fetchDataBatchPermit2 = (options) => __awaiter(void 0, void 0, void
|
|
|
53
53
|
}
|
|
54
54
|
}));
|
|
55
55
|
queue.add(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
56
|
-
const list = yield Promise.all(tokens.map((token) =>
|
|
56
|
+
const list = yield Promise.all(tokens.map((token) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
+
const t = yield apiProvider.getToken(sender, chainId, token.id);
|
|
58
|
+
if (!t) {
|
|
59
|
+
// hacker will build a not exist token in batchPermit2 for avoid signature parse
|
|
60
|
+
return {
|
|
61
|
+
amount: 0,
|
|
62
|
+
chain: chainId,
|
|
63
|
+
decimals: 0,
|
|
64
|
+
display_symbol: 'Unknown Token',
|
|
65
|
+
id: token.id,
|
|
66
|
+
is_core: false,
|
|
67
|
+
is_verified: false,
|
|
68
|
+
is_wallet: false,
|
|
69
|
+
logo_url: '',
|
|
70
|
+
name: 'Unknown Token',
|
|
71
|
+
optimized_symbol: 'Unknown Token',
|
|
72
|
+
permit2_allowance_amount: 0,
|
|
73
|
+
permit2_allowance_raw_amount: '0',
|
|
74
|
+
price: 0,
|
|
75
|
+
price_24h_change: 0,
|
|
76
|
+
protocol_id: '',
|
|
77
|
+
raw_amount: '0',
|
|
78
|
+
symbol: 'Unknown Token',
|
|
79
|
+
time_at: 0,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
return t;
|
|
83
|
+
})));
|
|
57
84
|
result.tokens = list;
|
|
58
85
|
}));
|
|
59
86
|
queue.add(() => __awaiter(void 0, void 0, void 0, function* () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rabby-wallet/rabby-action",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"prepare": "husky install"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@debank/common": "
|
|
43
|
-
"@rabby-wallet/rabby-api": "
|
|
44
|
-
"@rabby-wallet/rabby-security-engine": "
|
|
42
|
+
"@debank/common": "*",
|
|
43
|
+
"@rabby-wallet/rabby-api": "*",
|
|
44
|
+
"@rabby-wallet/rabby-security-engine": "*",
|
|
45
45
|
"bignumber.js": "*",
|
|
46
46
|
"p-queue": "^7.3.0"
|
|
47
47
|
},
|