Skip to content

Commit

Permalink
fix: correct typos (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
vlady-kotsev authored Jul 4, 2024
1 parent c1f94d4 commit 2c9fe7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/services/fee/distributor/distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ func New(members []string, treasuryID string, treasuryRewardPercentage int, vali
}

// CalculateMemberDistribution Returns the transactions to the members and the treasury
func (s Service) CalculateMemberDistribution(validTreasuryFee, validValdiatorFee int64) ([]transfer.Hedera, error) {
feePerAccount := validValdiatorFee / int64(len(s.accountIDs))
func (s Service) CalculateMemberDistribution(validTreasuryFee, validValidatorFee int64) ([]transfer.Hedera, error) {
feePerAccount := validValidatorFee / int64(len(s.accountIDs))

totalValidatorAmount := feePerAccount * int64(len(s.accountIDs))
if totalValidatorAmount != validValdiatorFee {
s.logger.Errorf("Provided validator fee [%d] is not divisible.", validValdiatorFee)
if totalValidatorAmount != validValidatorFee {
s.logger.Errorf("Provided validator fee [%d] is not divisible.", validValidatorFee)
return nil, errors.New("amount not divisible")
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/expected/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/limechain/hedera-eth-bridge-validator/app/domain/service"
)

func ReceiverAndFeeAmounts(feeCalc service.Fee, distributor service.Distributor, token string, amount int64) (receiverAmount, valdiatorsFee, treasuryFee int64) {
func ReceiverAndFeeAmounts(feeCalc service.Fee, distributor service.Distributor, token string, amount int64) (receiverAmount, validatorsFee, treasuryFee int64) {
fee, remainder := feeCalc.CalculateFee(token, amount)
validTreasuryFee, validValidatorsFee := distributor.ValidAmounts(fee)
validFee := validTreasuryFee + validValidatorsFee
Expand Down

0 comments on commit 2c9fe7d

Please sign in to comment.