File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/indexer-common/src/allocations Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ describe('TAP', () => {
313
313
redeemedAt : null ,
314
314
}
315
315
await queryFeeModels . receiptAggregateVouchers . create ( rav2 )
316
- let ravs = await tapCollector [ 'pendingRAVs' ] ( )
316
+ const ravs = await tapCollector [ 'pendingRAVs' ] ( )
317
317
await tapCollector [ 'markRavsInTransactionsAsRedeemed' ] ( transactions , ravs )
318
318
const redeemedRavs = await queryFeeModels . receiptAggregateVouchers . findAll ( {
319
319
where : {
@@ -326,7 +326,7 @@ describe('TAP', () => {
326
326
} )
327
327
// Expect redeemed rav to be returned here
328
328
expect ( redeemedRavs ) . toEqual ( [
329
- expect . objectContaining ( { ...rav2 , redeemedAt : nowSecs } ) ,
329
+ expect . objectContaining ( { ...rav2 , redeemedAt : new Date ( nowSecs * 1000 ) } ) ,
330
330
] )
331
331
} )
332
332
Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ export class TapCollector {
384
384
// transactions for different senders with the same allocation id
385
385
. filter ( ( tx ) => {
386
386
// check if exists in the ravsLastNotFinal list
387
- ! ! ravsLastNotFinal . find (
387
+ return ! ! ravsLastNotFinal . find (
388
388
( rav ) =>
389
389
// rav has the same sender address as tx
390
390
toAddress ( rav . senderAddress ) === toAddress ( tx . sender . id ) &&
@@ -695,7 +695,7 @@ export class TapCollector {
695
695
// https://github.com/sequelize/sequelize/issues/7664 (bug been open for 7 years no fix yet or ever)
696
696
const query = `
697
697
UPDATE scalar_tap_ravs
698
- SET redeemed_at = ${ timestamp ? timestamp : 'NOW()' }
698
+ SET redeemed_at = ${ timestamp ? `to_timestamp( ${ timestamp } )` : 'NOW()' }
699
699
WHERE allocation_id = '${ allocationId
700
700
. toString ( )
701
701
. toLowerCase ( )
You can’t perform that action at this time.
0 commit comments