We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09bfc7c commit 30fb984Copy full SHA for 30fb984
gov/staker/reward_calculation.gno
@@ -349,9 +349,11 @@ func calculateProtocolFee() {
349
return
350
}
351
352
- registered := common.ListRegisteredTokens()
353
- // get gov staker's grc20 balance
354
for _, tokenPath := range common.ListRegisteredTokens() {
+ tokenBalance, exists := accuProtocolFee.Get(tokenPath)
+ if !exists || tokenBalance == uint64(0) {
355
+ continue
356
+ }
357
358
leftValue, exists := leftProtocolFeeFromLast.Get(tokenPath)
359
leftFromLast := uint64(0)
@@ -399,4 +401,4 @@ func calculateProtocolFee() {
399
401
alreadyCalculatedProtocolFee.Set(tokenPath, current+tokenBalance.(uint64))
400
402
leftProtocolFeeFromLast.Set(tokenPath, tokenBalance.(uint64)-calculated)
403
-}
404
+}
0 commit comments