@@ -217,6 +217,7 @@ func fetchAttestations(
217217 hasAntiAbuseOracleAttestation bool ,
218218 minVotes int ,
219219) ([]SenderAttestation , error ) {
220+
220221 // Shuffle the validators
221222 shuffled := slices .Clone (allValidators )
222223 rand .Shuffle (len (shuffled ), func (i , j int ) {
@@ -354,7 +355,6 @@ func sendRewardClaimTransactions(
354355 transactionSender * spl.TransactionSender ,
355356 rewardClaim RewardClaim ,
356357 attestations []SenderAttestation ,
357- sourceTokenAccount * solana.PublicKey ,
358358) ([]solana.Signature , error ) {
359359 // Transaction to send attestations in a separate transaction
360360 partialTx := solana .NewTransactionBuilder ()
@@ -445,17 +445,14 @@ func sendRewardClaimTransactions(
445445 if err != nil {
446446 return nil , err
447447 }
448- if sourceTokenAccount == nil {
449- sourceTokenAccount = & state .TokenAccount
450- }
451448 evaluateAttestationInstruction , err := reward_manager .NewEvaluateAttestationInstruction (
452449 rewardClaim .RewardID ,
453450 rewardClaim .Specifier ,
454451 common .HexToAddress (rewardClaim .RecipientEthAddress ),
455- rewardClaim .Amount * rewardClaim . TokenDecimals , // Convert to token wei
452+ rewardClaim .Amount * 1e8 , // Convert to wAUDIO wei
456453 common .HexToAddress (rewardClaim .ClaimAuthority ),
457454 rewardManagerClient .GetProgramStateAccount (),
458- * sourceTokenAccount ,
455+ state . TokenAccount ,
459456 rewardClaim .UserBank ,
460457 feePayer .PublicKey (),
461458 )
@@ -555,7 +552,6 @@ func claimReward(
555552 transactionSender ,
556553 rewardClaim ,
557554 attestations ,
558- nil , // No ATA needed for AUDIO rewards
559555 )
560556 if err != nil {
561557 return nil , err
@@ -617,9 +613,8 @@ func getReward(rewardId string, rewardsList []rewards.Reward) (rewards.Reward, e
617613
618614type RewardClaim struct {
619615 rewards.RewardClaim
620- Handle string
621- UserBank solana.PublicKey
622- TokenDecimals uint64
616+ Handle string
617+ UserBank solana.PublicKey
623618}
624619
625620type ClaimResult struct {
@@ -716,9 +711,8 @@ func (app *ApiServer) v1ClaimRewards(c *fiber.Ctx) error {
716711 RecipientEthAddress : row .Wallet .String ,
717712 ClaimAuthority : antiAbuseOracle .DelegateOwnerWallet ,
718713 },
719- Handle : row .Handle .String ,
720- UserBank : * bankAccount ,
721- TokenDecimals : 8 , // wAUDIO wei
714+ Handle : row .Handle .String ,
715+ UserBank : * bankAccount ,
722716 }
723717
724718 validators := app .validators .GetNodes ()
0 commit comments