From 6d98db817643e9376e3d73bf175a3e4cf4d60b4a Mon Sep 17 00:00:00 2001 From: elsirion Date: Mon, 18 Dec 2023 14:07:41 +0100 Subject: [PATCH] feat: include version in footer --- Cargo.lock | 11 ++++++++--- Cargo.toml | 5 ++--- build.rs | 3 +++ src/components/app.rs | 9 +++++++-- src/components/footer.rs | 12 ++++++++++-- 5 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 build.rs diff --git a/Cargo.lock b/Cargo.lock index a862b30..09d2637 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -859,6 +859,7 @@ dependencies = [ "async-trait", "base64 0.21.3", "console_error_panic_hook", + "fedimint-build", "fedimint-client", "fedimint-core", "fedimint-ln-client", @@ -2713,13 +2714,15 @@ dependencies = [ [[package]] name = "ring" version = "0.16.20" -source = "git+https://github.com/dpc/ring?rev=5493e7e76d0d8fb1d3cbb0be9c4944700741b802#5493e7e76d0d8fb1d3cbb0be9c4944700741b802" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ "cc", "libc", "once_cell", "spin 0.5.2", "untrusted 0.7.1", + "web-sys", "winapi", ] @@ -2907,7 +2910,8 @@ dependencies = [ [[package]] name = "secp256k1-zkp" version = "0.7.0" -source = "git+https://github.com/dpc/rust-secp256k1-zkp/?branch=sanket-pr#f29b1b8c442d4b8a42547ce36d3987aaedf94224" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd403e9f0569b4131ab3fc9fa24a17775331b39382efd2cde851fdca655e3520" dependencies = [ "rand", "secp256k1 0.24.3", @@ -2918,7 +2922,8 @@ dependencies = [ [[package]] name = "secp256k1-zkp-sys" version = "0.7.0" -source = "git+https://github.com/dpc/rust-secp256k1-zkp/?branch=sanket-pr#f29b1b8c442d4b8a42547ce36d3987aaedf94224" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e7a2beac087c1da2d21018a3b7f043fe2f138654ad9c1518d409061a4a0034" dependencies = [ "cc", "secp256k1-sys 0.6.1", diff --git a/Cargo.toml b/Cargo.toml index 6d1b101..0af52f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,5 @@ web-sys = { version = "0.3.65", features = [ "Navigator", "Window", "ServiceWork gloo-storage = "0.3.0" rand = "0.8.5" -[patch.crates-io] -secp256k1-zkp = { git = "https://github.com/dpc/rust-secp256k1-zkp/", branch = "sanket-pr" } -ring = { git = "https://github.com/dpc/ring", rev = "5493e7e76d0d8fb1d3cbb0be9c4944700741b802" } +[build-dependencies] +fedimint-build = "0.2.1-rc1" \ No newline at end of file diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..7413f10 --- /dev/null +++ b/build.rs @@ -0,0 +1,3 @@ +fn main() { + fedimint_build::set_code_version(); +} diff --git a/src/components/app.rs b/src/components/app.rs index 636d9ee..2475867 100644 --- a/src/components/app.rs +++ b/src/components/app.rs @@ -15,7 +15,9 @@ use crate::components::service_worker::ServiceWorker; // #[component] pub fn App(cx: Scope) -> impl IntoView { - info!("Starting app..."); + pub const CODE_VERSION: &str = env!("FEDIMINT_BUILD_CODE_VERSION"); + + info!("Starting Webimint version {CODE_VERSION} ..."); let client = ClientRpc::new(); provide_client_context(cx, client.clone()); @@ -131,7 +133,10 @@ pub fn App(cx: Scope) -> impl IntoView { -