diff --git a/Cargo.toml b/Cargo.toml index 0ae92f52..a42ecd06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "manta-signer" edition = "2018" -version = "0.4.1" +version = "0.5.0" authors = ["Manta Network "] readme = "README.md" license-file = "LICENSE" diff --git a/release.sh b/release.sh index 077865ce..9d3e8189 100755 --- a/release.sh +++ b/release.sh @@ -28,7 +28,8 @@ The version numbers in the following files must be updated: 2. ui/src-tauri/Cargo.toml 3. ui/src-tauri/tauri.conf.json 4. ui/public/about.html - + 5. ui/package.json + EOF prompt "Did you update the version numbers?" diff --git a/src/service.rs b/src/service.rs index 0e9c5870..988eeb50 100644 --- a/src/service.rs +++ b/src/service.rs @@ -318,7 +318,7 @@ where .allow_credentials(false); let mut server = Server::with_state(State::new(config, authorizer)); server.with(cors); - server.at("/heartbeat").get(Self::heartbeat); + server.at("/version").get(Self::version); server.at("/recoverAccount").post(Self::recover_account); server .at("/deriveShieldedAddress") @@ -366,12 +366,13 @@ where self.0.state() } - /// Sends a heartbeat to the client. + /// Sends version to the client. #[inline] - async fn heartbeat(request: Request) -> ServerResult { - Self::log(String::from("HEARTBEAT")).await?; + async fn version(request: Request) -> ServerResult { + Self::log(String::from("REQUEST: version")).await?; let _ = request; - Ok(String::from("heartbeat")) + Self::log(format!("RESPONSE: {:?}", VERSION)).await?; + Ok(Body::from_json(&VersionMessage::default())?.into()) } /// Runs an account recovery for the given `request`. @@ -499,6 +500,20 @@ where } } +/// Version Message +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct VersionMessage { + /// Version + pub version: &'static str, +} + +impl Default for VersionMessage { + /// Builds a default [`VersionMessage`]. + fn default() -> Self { + Self { version: VERSION } + } +} + /// Shielded Address Message #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ShieldedAddressMessage { @@ -506,7 +521,7 @@ pub struct ShieldedAddressMessage { pub address: Vec, /// Version - pub version: String, + pub version: &'static str, } impl ShieldedAddressMessage { @@ -515,11 +530,10 @@ impl ShieldedAddressMessage { pub fn new(address: Vec) -> Self { Self { address, - version: "0.0.0".into(), + version: VERSION, } } } - /// Recover Account Message #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RecoverAccountMessage { diff --git a/ui/package.json b/ui/package.json index e9859a45..7006c8f6 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "manta-signer-ui", - "version": "0.4.0", + "version": "0.5.0", "private": true, "dependencies": { "@tauri-apps/api": "^1.0.0-beta.8", @@ -43,4 +43,4 @@ "devDependencies": { "@tauri-apps/cli": "^1.0.0-beta.10" } -} +} \ No newline at end of file diff --git a/ui/public/about.html b/ui/public/about.html index 07dba783..df664507 100644 --- a/ui/public/about.html +++ b/ui/public/about.html @@ -1,5 +1,6 @@ + @@ -15,29 +16,36 @@ color: black; font-family: monospace; } + main { text-align: center; margin-top: 3em; } + p { margin: 0.25em; font-size: 0.85em; } + button { margin: 1em; width: 6em; } +

Manta Signer

-

Version 0.4.1

+

Version 0.5.0

Copyright © 2019-2021 Manta Network

-

manta-network/manta-signer

-
+

+ manta-network/manta-signer +

+

DOLPHIN TESTNET

- + + \ No newline at end of file diff --git a/ui/src-tauri/Cargo.lock b/ui/src-tauri/Cargo.lock index 591b4c4a..043790e9 100644 --- a/ui/src-tauri/Cargo.lock +++ b/ui/src-tauri/Cargo.lock @@ -2694,7 +2694,7 @@ dependencies = [ [[package]] name = "manta-api" version = "0.3.3" -source = "git+https://github.com/Manta-Network/manta-api?branch=manta#bb37de4b7a72c267eaefe458b1060107e46bbf9c" +source = "git+https://github.com/Manta-Network/manta-api?branch=manta#309e272f46a9a25b468a11d9c36716a7e32c85a5" dependencies = [ "ark-bls12-381", "ark-crypto-primitives", @@ -2796,7 +2796,7 @@ dependencies = [ [[package]] name = "manta-signer" -version = "0.4.1" +version = "0.5.0" dependencies = [ "ark-serialize", "async-std", @@ -2824,7 +2824,7 @@ dependencies = [ [[package]] name = "manta-signer-ui" -version = "0.4.1" +version = "0.5.0" dependencies = [ "async-std", "manta-signer", diff --git a/ui/src-tauri/Cargo.toml b/ui/src-tauri/Cargo.toml index 3c60b72e..73577e24 100644 --- a/ui/src-tauri/Cargo.toml +++ b/ui/src-tauri/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "manta-signer-ui" edition = "2018" -version = "0.4.1" +version = "0.5.0" authors = ["Manta Network "] readme = "README.md" license-file = "LICENSE" diff --git a/ui/src-tauri/tauri.conf.json b/ui/src-tauri/tauri.conf.json index 5f0f8855..3cc94c61 100644 --- a/ui/src-tauri/tauri.conf.json +++ b/ui/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "package": { "productName": "Manta Signer", - "version": "0.4.1" + "version": "0.5.0" }, "build": { "distDir": "../build", @@ -87,4 +87,4 @@ "iconAsTemplate": true } } -} +} \ No newline at end of file