Closed TimoGlastra closed 3 years ago
I took an initial shot at this. It compiles for iOS, but haven't tested it yet for both Android and iOS.
https://github.com/TimoGlastra/rn-indy-sdk/tree/fix/wallet-open
I think this issue was fixed with #47 @TimoGlastra
When developing with rn-indy-sdk oftentimes the JavaScript bundle is reloaded which means it will reintialize and lose the handle to the opened wallet, while it is still open. This results in errors
Scenario:
This could be fixed by storing the wallet handle in persistence (e.g. react-native-async-storage), but that seems like the wrong place to solve this to me.
I think we should do some custom handling before calling the indy native open wallet method and first check if this wallet is already opened. This requires us to store some extra data (mainly wallet id, possibly more) in memory to know this wallet is already. opened If this is the case we can just return the wallet handle.
Scenario: