Skip to content

Commit

Permalink
Fixed GetAsyncChannel on inactive address
Browse files Browse the repository at this point in the history
  • Loading branch information
xssnick committed Aug 14, 2023
1 parent e1fb352 commit fd7ba07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,10 @@ client.SetOnDisconnect(func(addr, serverKey string) {
* ✅ Overlays
* ✅ TL Parser/Serializer
* ✅ TL-B Parser/Serializer
* ✅ Payment channels
* ✅ Liteserver proofs automatic validation
* DHT Server
* Payment channels
* Merkle proofs automatic validation
* TVM

<!-- Badges -->
[ton-svg]: https://img.shields.io/badge/Based%20on-TON-blue
Expand Down
4 changes: 4 additions & 0 deletions ton/payments/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func (c *Client) GetAsyncChannel(ctx context.Context, addr *address.Address, ver
return nil, fmt.Errorf("failed to get account: %w", err)
}

if !acc.IsActive {
return nil, fmt.Errorf("channel account is not active")
}

if verify {
codeBoC, _ := hex.DecodeString(AsyncPaymentChannelCodeBoC)
code, _ := cell.FromBOC(codeBoC)
Expand Down

0 comments on commit fd7ba07

Please sign in to comment.