cosmos / ibc-apps

IBC applications and middleware for Cosmos SDK chains.
Apache License 2.0
82 stars 62 forks source link

Make router.getReceiver public #131

Closed jcompagni10 closed 10 months ago

jcompagni10 commented 10 months ago

Hello, I think it would be highly beneficial to make the packet-forward-middleware function getReceiver public https://github.com/cosmos/ibc-apps/blob/0288bf5c3ec205134e288815f654b59611bd2153/middleware/packet-forward-middleware/packetforward/ibc_middleware.go#L143 There are a number of use cases where other middleware may need to also have access to this address. In particular, for Duality/Neutron, our swap-and-forward middleware needs to use this same address to receive funds from a swap in order to be forwarded correctly by the PFM. As a temporary fix, we have copied over the code for getReceiver into our own middleware, but this is a very brittle solution.

Thanks for your consideration.

jtieri commented 10 months ago

hey @jcompagni10!

this seems like a perfectly reasonable request, I will go ahead and get a PR created now and get that backported to our other supported versions.

jcompagni10 commented 10 months ago

Amazing! Thanks for the quick turnaround on this Justin.