Skip to content

Commit

Permalink
fixing: (HAL-04) SORT MAPPINGS BEFORE USAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeneDeLuca committed Oct 8, 2024
1 parent e08311e commit e488a38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/solana.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"log"
"os"
"sort"
"strings"

"github.com/davecgh/go-spew/spew"
Expand Down Expand Up @@ -241,6 +242,10 @@ func SendTxFeeSettlement(rpcUrl string, data_accounts []string, FromId uint64, E
Amount: value,
})
}
//sort bills by key
sort.Slice(Bills, func(i, j int) bool {
return Bills[i].Key.String() < Bills[j].Key.String()
})

instructionData := SettleFeeBillParams{
Instruction: 1,
Expand Down

0 comments on commit e488a38

Please sign in to comment.