When switching the provider, the wallet gets cleared. I think that happens unintentionally and I don't really see a reason for clearing the wallet here. The current wallet gets replaced by the new Lucid instance's wallet (which is of course undefined).
When switching the provider, the wallet gets cleared. I think that happens unintentionally and I don't really see a reason for clearing the wallet here. The current wallet gets replaced by the new Lucid instance's wallet (which is of course undefined).
It happens here: https://github.com/spacebudz/lucid/blob/501c5b0139bbad25687bfbed47c93b96c4b65bf5/src/lucid/lucid.ts#L136
By simply removing this line, the issue should be fixed.