Skip to content

Commit

Permalink
ci: 🎡 update aelf-sdk; token transfer add check
Browse files Browse the repository at this point in the history
  • Loading branch information
hzz780 committed Mar 8, 2022
1 parent 5a0a877 commit 1a55124
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"dependencies": {
"@sentry/node": "^5.19.1",
"aelf-block-scan": "^0.4.1",
"aelf-sdk": "^3.2.34",
"aelf-sdk": "^3.2.40",
"ali-rds": "^3.3.0",
"bluebird": "^3.5.5",
"cross-env": "^5.2.0",
Expand Down
2 changes: 2 additions & 0 deletions src/formatters/balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ async function tokenBalanceChangedFormatter(transaction, type, db) {
addressSymbols = addressSymbols
.reduce((acc, v) => [...acc, ...v], [])
.reduce((acc, v) => [...acc, ...v], []);
// 用来排除非法的Token名称或者用户自定义的Token名称
addressSymbols = addressSymbols.filter(v => v.symbol.match(/^[a-z0-9]+$/i));
addressSymbols = lodash.uniq(addressSymbols.map(v => `${v.owner}_${v.symbol}`));
const balancesFromCache = addressSymbols
.filter(v => type !== QUERY_TYPE.LOOP && BALANCES_NOT_IN_LOOP[v] !== undefined)
Expand Down

0 comments on commit 1a55124

Please sign in to comment.