-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cw20 statistic #258
base: main
Are you sure you want to change the base?
fix: cw20 statistic #258
Conversation
@peara Pull này fix statistic những contract ko có holder thì lưu là 0 và sửa lỗi: hôm thứ 6 start cw20 ko được vì statistic startBlock là 0 thì bị sai ạ |
src/services/cw20/cw20.service.ts
Outdated
@@ -266,10 +269,13 @@ export default class Cw20Service extends BullableService { | |||
.alias('cw20_contract') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alias này khác gì đâu?
src/services/cw20/cw20.service.ts
Outdated
.groupBy('holders.cw20_contract_id') | ||
.select('holders.cw20_contract_id'); | ||
.select( | ||
'holders.cw20_contract_id', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cw20_contract.id?
.select( | ||
'holders.cw20_contract_id', | ||
knex.raw( | ||
'count(CASE when holders.amount > 0 THEN 1 ELSE null END) as count' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hình như left join count là đc?
await Block.query() | ||
.where('height', startBlock + 1) | ||
.first() | ||
.throwIfNotFound() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (lastUpdatedDate && lastUpdatedDate >= systemDate) return;
No description provided.