Skip to content

Commit

Permalink
fix: update NULL:integer when batchUpdate integer
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Oct 3, 2024
1 parent 9c92566 commit 3a0cc4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/common/utils/db_connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export async function batchUpdate(
}
return '{}';
}
if (record[field]?.type === 'number') {
if (record[field]?.type === 'integer') {
if (record[field].value !== undefined) {
return record[field].value;
}
return 'NULL';
return 'NULL::integer';
}
if (record[field] !== undefined) {
return `'${record[field]}'`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ export default class UpdateAccountIdInEVMTransaction extends BullableService {
listUpdateAccountInTx.push({
id: tx.id,
from_account_id: {
type: 'number',
type: 'integer',
value: tx.from ? listAddressDB[bytesToHex(tx.from)]?.id : undefined,
},
to_account_id: {
type: 'number',
type: 'integer',
value: tx.to ? listAddressDB[bytesToHex(tx.to)]?.id : undefined,
},
});
Expand Down

0 comments on commit 3a0cc4d

Please sign in to comment.