vulpemventures / ocean

:ocean: Elements/Liquid wallet daemon
MIT License
5 stars 7 forks source link

Fallback to scanner to fetch confirmation info for external txs #82

Closed altafan closed 5 months ago

altafan commented 5 months ago

This adds fallback strategy to fetch confirmation info of tx external to the wallet, ie not stored in the storage but fetched via blockchain scanner.

Unfortunately, there's no way we can use electrum's apis to get such info, so we have to fallback to esplora. For this, the usage of ESPLORA_URL env var has been revamped like follows:

By default, the esplora URL is derived from the network, but it can be customized at will by specifying it with OCEAN_ESPLORA_URL. This way, ocean can be served in a dockerized env, like for example nigiri where the esplora URL becomes :3001 instead of localhost.

The blockchain scanner now returns tx confirmation info also for external txs.

Please @louisinger review.

tiero commented 5 months ago

utACK