Skip to content

Commit a317d9b

Browse files
committed
Don't create a CCCChange for zero deposit nomination
1 parent d326da0 commit a317d9b

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/worker/staticFeeDistribution.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -325,18 +325,20 @@ export async function trackBalanceChangeByTx(
325325
networkId: sdk.networkId
326326
});
327327
const deposit = stakeAction.deposit;
328-
queries.push(
329-
CCCChangeModel.stakeDeposit(
330-
{
331-
address: signer.value,
332-
change: deposit,
333-
isNegative: true,
334-
blockNumber,
335-
transactionHash
336-
},
337-
{ transaction }
338-
)
339-
);
328+
if (deposit.isGreaterThan(0)) {
329+
queries.push(
330+
CCCChangeModel.stakeDeposit(
331+
{
332+
address: signer.value,
333+
change: deposit,
334+
isNegative: true,
335+
blockNumber,
336+
transactionHash
337+
},
338+
{ transaction }
339+
)
340+
);
341+
}
340342
break;
341343
}
342344
case "reportDoubleVote": {

0 commit comments

Comments
 (0)