-
Notifications
You must be signed in to change notification settings - Fork 992
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
Fix ibc-gen-shielded to receive a non-Namada token #2311
Conversation
sdk/src/rpc.rs
Outdated
None => { | ||
return context | ||
.wallet() | ||
.await | ||
.find_address(token.as_ref()) | ||
.map(|addr| addr.to_string()) | ||
.unwrap_or(token.as_ref().to_string()); | ||
} |
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.
is this the correct behavior? users could have populated their wallet with an alias that might coincide with some other chain's address format. it's odd, but certainly possible. perhaps we should document in the cli the order of parsing/look-ups
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.
Good point. We shouldn't look up the token address with the wallet of the destination chain.
When ibc-gen-shielded
is requested, a user is trying to send the token of another chain. A user should be able to get the raw address of the token on the source chain.
And, if the token address is invalid, though the proof will be generated, the following ibc-transfer will fail.
(When query_ibc_denom
is called from ibc-transfer
, the token should be parsed and this Err
branch shouldn't be reached.)
@@ -0,0 +1,2 @@ | |||
- Non-Namada token can be given to ibc-gen-shielded |
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.
I think we also need another changelog for the sdk updates
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.
Looks good to me, thanks!
* origin/yuji/fix-ibc-gen-shielded: add SDK changelog fix parsing token address add changelog non-namada token to ibc-gen-shielded
* origin/yuji/fix-ibc-gen-shielded: fix e2e test add SDK changelog fix parsing token address add changelog non-namada token to ibc-gen-shielded
* origin/yuji/fix-ibc-gen-shielded: fix e2e test add SDK changelog fix parsing token address add changelog non-namada token to ibc-gen-shielded
Describe your changes
closes #2308
closes #2309
ibc-gen-shielded
should get not only a Namada token but also a non-Namada token to transfer it from non-Namada chainsIndicate on which release or other PRs this topic is based on
v0.28.1
Checklist before merging to
draft