If a wallet calls connect multiple times, the list of meerkat connections clumped, even though all meerkats are for the same connection.
This commit add the option to only allow a single meerkat instance for a given identifier to exist. If a new one is created, the old one will be closed and removed.
This also fixes a small but from last commit where wallet address was not given to verify connect, which broke the autoconnect management.
tl;dr This fixes https://github.com/fabianbormann/cardano-peer-connect/issues/44
If a wallet calls connect multiple times, the list of meerkat connections clumped, even though all meerkats are for the same connection.
This commit add the option to only allow a single meerkat instance for a given identifier to exist. If a new one is created, the old one will be closed and removed.
This also fixes a small but from last commit where wallet address was not given to verify connect, which broke the autoconnect management.