fix: owner and foundation same address for reward (#1024)

Co-authored-by: liam.lai <liam.lai@us>
This commit is contained in:
benjamin202410 2025-05-01 08:46:09 -07:00 committed by GitHub
parent d25c6f02a7
commit 3cea40cf9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -466,7 +466,12 @@ func GetRewardBalancesRate(foundationWalletAddr common.Address, statedb *state.S
foundationReward := new(big.Int).Mul(totalReward, new(big.Int).SetInt64(common.RewardFoundationPercent))
foundationReward = new(big.Int).Div(foundationReward, new(big.Int).SetInt64(100))
balances[foundationWalletAddr] = foundationReward
if balances[foundationWalletAddr] != nil {
balances[foundationWalletAddr].Add(balances[foundationWalletAddr], foundationReward)
} else {
balances[foundationWalletAddr] = foundationReward
}
jsonHolders, err := json.Marshal(balances)
if err != nil {