(plugin: Plugin<()>)
| 1 | use cln_plugin::{Plugin, messages::ProxyInfo}; |
| 2 | |
| 3 | pub fn get_proxy(plugin: Plugin<()>) -> Option<ProxyInfo> { |
| 4 | match plugin.configuration().always_use_proxy { |
| 5 | Some(use_proxy) => { |
| 6 | if !use_proxy { |
| 7 | return None; |
| 8 | } |
| 9 | } |
| 10 | None => return None, |
| 11 | }; |
| 12 | plugin.configuration().proxy |
| 13 | } |
no test coverage detected