mirror of
https://github.com/mimblewimble/grin-wallet.git
synced 2025-01-20 19:11:09 +03:00
Show QR code for listener address (#650)
Co-authored-by: cliik <cliik@example.com>
This commit is contained in:
parent
b45802aa6b
commit
7b1eab62b1
1 changed files with 6 additions and 1 deletions
|
@ -31,6 +31,7 @@ use grin_wallet_util::OnionV3Address;
|
|||
use hyper::body;
|
||||
use hyper::header::HeaderValue;
|
||||
use hyper::{Body, Request, Response, StatusCode};
|
||||
use qr_code::QrCode;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json;
|
||||
use std::collections::HashMap;
|
||||
|
@ -351,7 +352,11 @@ where
|
|||
|
||||
warn!("HTTP Foreign listener started.");
|
||||
if let Some(a) = address {
|
||||
warn!("Slatepack Address is: {}", a);
|
||||
let qr_string = match QrCode::new(a.to_string()) {
|
||||
Ok(qr) => qr.to_string(false, 3),
|
||||
Err(_) => "Failed to generate QR code!".to_string(),
|
||||
};
|
||||
warn!("Slatepack Address is: {}\n{}", a, qr_string);
|
||||
}
|
||||
|
||||
api_thread
|
||||
|
|
Loading…
Reference in a new issue