-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
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]>
There was a problem hiding this 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
I will check and test, thanks |
Removed duplicate line. Optimize code sequence. Signed-off-by: hwangjae lee <[email protected]>
There was a problem hiding this 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.
srcChainID is removed. Add src.ChainID(). Signed-off-by: Hwangjae lee <[email protected]>
New commit is updated. |
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]