This function converts a network string into a Network struct. However, we don't need to create a separate API for this functionality, as it can be accomplished using the existing Network::from_str() method from rust-bitcoin.
Thus we have to find all such functions and remove them and directly call corresponding built-in apis.
In the utill.rs file, there are several functions that perform tasks for which APIs already exist in the dependency libraries.
For example https://github.com/citadel-tech/coinswap/blob/691c937454ccf1c2a182ef0aca1d514b7f74606d/src/utill.rs#L465
This function converts a network string into a Network struct. However, we don't need to create a separate API for this functionality, as it can be accomplished using the existing
Network::from_str()
method fromrust-bitcoin
.Thus we have to find all such functions and remove them and directly call corresponding built-in apis.