Skip to content

fix: use getChannel instead of getConnection for channel queries#1244

Open
Lil-Duckling-22 wants to merge 1 commit into
cosmos:mainfrom
Lil-Duckling-22:fix/channel-query-method
Open

fix: use getChannel instead of getConnection for channel queries#1244
Lil-Duckling-22 wants to merge 1 commit into
cosmos:mainfrom
Lil-Duckling-22:fix/channel-query-method

Conversation

@Lil-Duckling-22
Copy link
Copy Markdown

Motivation

The channel handshake logic in pendingDatagrams incorrectly uses getConnection() with a non-existent counterpartyIdentifier field when querying channels. This breaks the example code since ChannelEnd doesn't have counterpartyIdentifier—it uses counterpartyPortIdentifier and counterpartyChannelIdentifier.

Solution

Replace counterparty.getConnection(localEnd.counterpartyIdentifier) with counterparty.getChannel(localEnd.counterpartyPortIdentifier, localEnd.counterpartyChannelIdentifier) to correctly query the counterparty channel end using the proper method and fields from the ChannelEnd structure.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submit the change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants