Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usercase extension with 'rly tx transfer' #805

Merged
merged 4 commits into from
Jun 28, 2022
Merged

Usercase extension with 'rly tx transfer' #805

merged 4 commits into from
Jun 28, 2022

Conversation

meetrick
Copy link
Contributor

related issue:
#804

description:
When sending a transaction with rly tx trnsfer, relayer must verify the
channel exists based off the path metadata's "src" and "dst" chain.

Signed-off-by: hwangjae lee [email protected]

related issue:
#804

description:
When sending a transaction with rly tx trnsfer, relayer must verify the
channel exists based off the path metadata's "src" and "dst" chain.

Signed-off-by: hwangjae lee <[email protected]>
Copy link
Contributor

@boojamya boojamya left a comment

Choose a reason for hiding this comment

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

Instead of duplicating that code. Maybe do something like this?

var pathConnectionID string
if src.Chainid == path.Src.ChainID {
	pathConnectionID = path.Src.ConnectionID
} else if src.Chainid == path.Dst.ChainID {
	pathConnectionID = path.Dst.ConnectionID
} else {
	return fmt.Errorf("no path configured using chain-id: %s", src.Chainid)
}
			

And then in that QueryConnectionChannels function, pass pathConnectionID instead of path.Src.ConnectionID

@meetrick
Copy link
Contributor Author

I will check and test, thanks

Removed duplicate line.
Optimize code sequence.

Signed-off-by: hwangjae lee <[email protected]>
Copy link
Contributor

@boojamya boojamya left a comment

Choose a reason for hiding this comment

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

It did work!
Just a clean up.

cmd/tx.go Outdated Show resolved Hide resolved
cmd/tx.go Outdated Show resolved Hide resolved
cmd/tx.go Outdated Show resolved Hide resolved
cmd/tx.go Outdated Show resolved Hide resolved
cmd/tx.go Outdated Show resolved Hide resolved
srcChainID is removed.
Add src.ChainID().

Signed-off-by: Hwangjae lee <[email protected]>
@meetrick
Copy link
Contributor Author

New commit is updated.
These patches are working well.

@boojamya boojamya merged commit 8165bec into cosmos:main Jun 28, 2022
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