Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testnet address generation to wallet-wasm.
The motivation to change this part of the deprecated `wallet-wasm` library was the simple introduction of testnet address support in yoroi-mobile. The alternative is to migrate all of yoroi-mobile away to use the new `cardano-wallet` module, but this would be significant work in comparasin and can be delayed. Directly adapating `react-native-cardano` to use `cardano-wallet` was not feasable either as the API is quite different and would be exceptionally awkward to try and force into the `react-native-cardano` API that was built on top of `wallet-wasm` with its API in mind. Only `xwallet_account()` was changed, as the other function lacking support for testnet, `wallet_public_to_address()` does not seem to be used anywhere in react-native-cardano, which was the motivation for this change. Changing `wallet_public_to_address()` would also be more difficult as it requires a hard API change or an additional function to allow overloading. On the other hand, `xwallet_account()` supports a JSON API, which conveniently allows us to be backwards compatable, as the absence of the `protocol_magic` field will revert to the previous behavior of default (mainnet) protocol magic.
- Loading branch information