diff --git a/README.md b/README.md index e13c9db1..917a9752 100644 --- a/README.md +++ b/README.md @@ -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 [ton-svg]: https://img.shields.io/badge/Based%20on-TON-blue diff --git a/ton/payments/channel.go b/ton/payments/channel.go index 0469b4e5..0b609601 100644 --- a/ton/payments/channel.go +++ b/ton/payments/channel.go @@ -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)