-
Notifications
You must be signed in to change notification settings - Fork 3.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
[Bug]: Module not Registered but still used on client #17888
Comments
Where exactly do you get this error? |
On this line |
cosmos-sdk config is a singleton, whenever akash module included it will call for this and seal the config which includes bech type |
@julienrbrt Any chance this can be discussed? This limits SDK applications to manage different chains, or is there a known workaround? |
That's not due to the SDK. Apparently importing Akash modules has side effects (that init function will be called). There is nothing the SDK can do about it. |
Yeah, it's kind of wanky solution from our side, coming from the fact the |
Is there an existing issue for this?
What happened?
I want to be able to pass the modules to register in my
client
. So that I can at runtime decide whether it will be a cosmos client or other chain.I have the following variable:
And this method that adds the modules together:
This works if I try to send tokens between Akash addresses.
If I pass an empty
[]module.AppModuleBasic{}
like this:I get the error
invalid Bech32 prefix; expected akash, got cosmos
which is weird, since I did not include any reference toAkashModuleBasics
.Now, if I remove all the modules from inside the
AkashModuleBasics
so that the slice is empty, the code works.It leads me to believe that there is some kind of reflection in use that finds my
AkashModuleBasics
even if I do not specifically register it.Cosmos SDK Version
v0.45.16
How to reproduce?
No response
The text was updated successfully, but these errors were encountered: