Skip to content

Commit

Permalink
Update dto
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemKolodko committed Dec 1, 2024
1 parent 903e965 commit 8ca6b02
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/entities/competition.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class CompetitionEntity {
blockNumber: number;

@ApiProperty()
@Column({ type: 'bigint' })
@Column({ type: 'integer' })
competitionId: number;

@ApiProperty()
Expand Down
2 changes: 1 addition & 1 deletion src/entities/token.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Token {
competitionId: number;

@ApiProperty()
@Column({ type: 'integer' })
@Column({ type: 'bigint' })
timestamp: number;

@ManyToOne(() => UserAccount, (user) => user.tokens, {
Expand Down
8 changes: 4 additions & 4 deletions src/entities/token.winner.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ export class TokenWinner {
token: Token

@ApiProperty()
@Column({ type: 'decimal', default: 0 })
competitionId: string;
@Column({ type: 'integer' })
competitionId: number;

@ApiProperty()
@Column({ type: 'decimal', default: 0 })
timestamp: string;
@Column({ type: 'bigint' })
timestamp: number;

@ApiProperty()
@Column()
Expand Down
4 changes: 2 additions & 2 deletions src/indexer/indexer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export class IndexerService {
const blockNumber = Number(event.blockNumber)
const values = event.returnValues
const winnerAddress = (values['winner'] as string).toLowerCase()
const competitionId = String(values['competitionId'] as bigint)
const timestamp = String(values['timestamp'] as bigint)
const competitionId = Number(values['competitionId'] as bigint)
const timestamp = Number(values['timestamp'] as bigint)

if(winnerAddress === ZeroAddress) {
this.logger.warn(`winnerAddress=${winnerAddress}, txnHash=${txnHash}, skip`)
Expand Down

0 comments on commit 8ca6b02

Please sign in to comment.