xssnick / tonutils-go

TON SDK Library in pure Golang for interacting with The Open Network ecosystem using native protocols, such as ADNL, RLDP and etc.
Apache License 2.0
535 stars 108 forks source link

Fixed panic in SubscribeOnTransactions method #146

Closed pr0n1x closed 11 months ago

pr0n1x commented 11 months ago

In some cases first transaction in the result is fulfils this condition https://github.com/xssnick/tonutils-go/blob/a7f4ad3fdb53556b4d9084216e408c05ffaf0bed/ton/transactions.go#L243 Therefore transactions variable contains empty slice which leads to panic in this line https://github.com/xssnick/tonutils-go/blob/a7f4ad3fdb53556b4d9084216e408c05ffaf0bed/ton/transactions.go#L253

xssnick commented 11 months ago

Good catch, thank you! Will merge it tomorrow and make a new fixup tag