Skip to content

Commit

Permalink
comparison fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akos-tk committed Sep 16, 2024
1 parent 918ea03 commit a66b5cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions liteapi/account.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package liteapi

import (
"bytes"
"context"
"errors"
"fmt"
Expand All @@ -23,7 +22,7 @@ func (c *Client) GetAccountWithProof(ctx context.Context, accountID ton.AccountI
}

var blockHash ton.Bits256
if accountID.Workchain == -1 || blockID == res.Shardblk.ToBlockIdExt() {
if (accountID.Workchain == -1 && blockID.Workchain == -1) || blockID == res.Shardblk.ToBlockIdExt() {
blockHash = blockID.RootHash
} else {
if len(res.ShardProof) == 0 {
Expand Down Expand Up @@ -57,7 +56,7 @@ func (c *Client) GetAccountWithProof(ctx context.Context, accountID ton.AccountI
values := shardState.ShardStateUnsplit.Accounts.Values()
keys := shardState.ShardStateUnsplit.Accounts.Keys()
for i, k := range keys {
if bytes.Equal(k[:], accountID.Address[:]) {
if k == accountID.Address {
return &values[i], shardState, nil
}
}
Expand Down

0 comments on commit a66b5cd

Please sign in to comment.