Skip to content

Commit d7405e5

Browse files
Merge pull request #296 from chaosfinance/main
fix account comparison function
2 parents 12a35d7 + 0caef11 commit d7405e5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

account.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ func (a AccountMeta) less(act *AccountMeta) bool {
9696
if a.IsWritable != act.IsWritable {
9797
return a.IsWritable
9898
}
99-
return false
99+
100+
return a.PublicKey.String() < act.PublicKey.String()
100101
}
101102

102103
type AccountMetaSlice []*AccountMeta

programs/token/rpc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828
const MINT_SIZE = 82
2929

3030
func (mint *Mint) Decode(data []byte) error {
31-
mint = new(Mint)
3231
dec := bin.NewBinDecoder(data)
3332
if err := dec.Decode(&mint); err != nil {
3433
return fmt.Errorf("unable to decode mint: %w", err)

0 commit comments

Comments
 (0)