Skip to content

Commit

Permalink
chore: replace isStatusFailure with negated isStatusSuccess
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 committed Oct 24, 2024
1 parent 1a2a4ea commit a46fcb5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions apps/indexer-sentio/src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
startBlock: startBlock,
})
.onLogMarketConfigurationEvent(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down Expand Up @@ -240,7 +240,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
}
})
.onLogCollateralAssetAdded(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down Expand Up @@ -344,7 +344,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
await ctx.store.upsert(poolSnapshot);
})
.onLogCollateralAssetUpdated(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down Expand Up @@ -380,7 +380,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
await ctx.store.upsert(collateralConfiguration);
})
.onLogUserBasicEvent(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down Expand Up @@ -418,7 +418,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
await ctx.store.upsert(userBasic);
})
.onLogUserSupplyCollateralEvent(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down Expand Up @@ -552,7 +552,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
await ctx.store.upsert(eventEntity);
})
.onLogUserWithdrawCollateralEvent(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down Expand Up @@ -668,7 +668,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
await ctx.store.upsert(eventEntity);
})
.onLogAbsorbCollateralEvent(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down Expand Up @@ -751,7 +751,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
await ctx.store.upsert(collateralPosition);
})
.onLogUserSupplyBaseEvent(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down Expand Up @@ -841,7 +841,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
await ctx.store.upsert(eventEntity);
})
.onLogUserWithdrawBaseEvent(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down Expand Up @@ -931,7 +931,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
await ctx.store.upsert(eventEntity);
})
.onLogMarketBasicEvent(async (event, ctx) => {
if (ctx.transaction?.isStatusFailure) {
if (!ctx.transaction?.isStatusSuccess) {
return;
}

Expand Down

0 comments on commit a46fcb5

Please sign in to comment.