Closed icc-romeu closed 3 years ago
@JamesKEbert maybe this is interesting for you if you are using it on Aries Bifold
Fixed your comment @TimoGlastra. Ready to be merged if you want to 😄
Looks good to me! I don't have permission to merge however.
We need @jakubkoci for that
Thanks for your additions here @icc-romeu and @TimoGlastra !
This is a fix for RN Hot reload. I picked @TimoGlastra work and fixed it for iOS -it was not working- and Android.
The problem was that React Native reloads the native modules each time you reload the app and usually Metro will do that each time you save a file. Hence, the Wallet and Pool handles are lost on the native module, but they are still opened in libindy, and you got an error.
What I did is defining the wallet and the pool handles as static dictionaries, and store them in memory. They cannot be class members as IndySDK class is re-created each time RN reloads.
I fixed some deprecation warnings on iOS too.