Skip to content

Commit

Permalink
fix: prevent reset app dialog after copying monero address (#1116)
Browse files Browse the repository at this point in the history
Description
---
Prevent reset app dialog popping up when user copies monero address
Closes: #856 

Motivation and Context
---
We should show this dialog only when user changes monero address.

How Has This Been Tested?
---
Run on ubuntu and windows, repeatedly clicked monero address multiple
times and the dialog did not show up.

What process can a PR reviewer use to test or verify this change?
---
Same as above.


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify
  • Loading branch information
MCozhusheck authored Nov 25, 2024
1 parent 63ffaee commit 42ede56
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
50 changes: 25 additions & 25 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ version = "0.7.7"

[build-dependencies]
embed-resource = "2.5.0"
tauri-build = {version = "1.5.5", features = ["isolation"]}
tauri-build = { version = "1.5.5", features = ["isolation"] }

[dependencies]
anyhow = "1"
async-trait = "0.1.81"
async_zip = {version = "0.0.17", features = ["full"]}
async_zip = { version = "0.0.17", features = ["full"] }
auto-launch = "0.5.0"
base64 = "0.22.1"
blake2 = "0.10"
Expand All @@ -28,46 +28,46 @@ futures-lite = "2.3.0"
futures-util = "0.3.30"
human_format = "1.1.0"
jsonwebtoken = "9.3.0"
keyring = {version = "3.0.5", features = [
keyring = { version = "3.0.5", features = [
"windows-native",
"apple-native",
"linux-native",
]}
libsqlite3-sys = {version = "0.25.1", features = [
] }
libsqlite3-sys = { version = "0.25.1", features = [
"bundled",
]}# Required for tari_wallet
] } # Required for tari_wallet
log = "0.4.22"
log4rs = "1.3.0"
minotari_node_grpc_client = {git = "https://github.com/tari-project/tari.git", branch = "development"}
minotari_wallet_grpc_client = {git = "https://github.com/tari-project/tari.git", branch = "development"}
nix = {version = "0.29.0", features = ["signal"]}
minotari_node_grpc_client = { git = "https://github.com/tari-project/tari.git", branch = "development" }
minotari_wallet_grpc_client = { git = "https://github.com/tari-project/tari.git", branch = "development" }
nix = { version = "0.29.0", features = ["signal"] }
nvml-wrapper = "0.10.0"
open = "5"
phraze = "0.3.15"
rand = "0.8.5"
regex = "1.10.5"
reqwest = {version = "0.12.5", features = ["stream", "json", "multipart"]}
reqwest = { version = "0.12.5", features = ["stream", "json", "multipart"] }
sanitize-filename = "0.5"
semver = "1.0.23"
sentry = {version = "0.34.0", features = ["anyhow"]}
sentry = { version = "0.34.0", features = ["anyhow"] }
sentry-tauri = "0.3.0"
serde = {version = "1", features = ["derive"]}
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9.10"
sha2 = "0.10.8"
sys-locale = "0.3.1"
sysinfo = "0.31.2"
tar = "0.4.26"
tari_common = {git = "https://github.com/tari-project/tari.git", branch = "development"}
tari_common_types = {git = "https://github.com/tari-project/tari.git", branch = "development"}
tari_core = {git = "https://github.com/tari-project/tari.git", branch = "development", features = [
tari_common = { git = "https://github.com/tari-project/tari.git", branch = "development" }
tari_common_types = { git = "https://github.com/tari-project/tari.git", branch = "development" }
tari_core = { git = "https://github.com/tari-project/tari.git", branch = "development", features = [
"transactions",
]}
] }
tari_crypto = "0.21.0"
tari_key_manager = {git = "https://github.com/tari-project/tari.git", branch = "development"}
tari_shutdown = {git = "https://github.com/tari-project/tari.git", branch = "development"}
tari_key_manager = { git = "https://github.com/tari-project/tari.git", branch = "development" }
tari_shutdown = { git = "https://github.com/tari-project/tari.git", branch = "development" }
tari_utilities = "0.8.0"
tauri = {version = "1.8.0", features = [
tauri = { version = "1.8.0", features = [
"window-unmaximize",
"window-unminimize",
"os-all",
Expand All @@ -87,12 +87,12 @@ tauri = {version = "1.8.0", features = [
"icon-ico",
"icon-png",
"process-command-api",
]}
tauri-plugin-single-instance = {git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1"}
] }
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
thiserror = "1.0.26"
tokio = {version = "1", features = ["full"]}
tokio-util = {version = "0.7.11", features = ["compat"]}
xz2 = {version = "0.1.7", features = ["static"]}# static bind lzma
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7.11", features = ["compat"] }
xz2 = { version = "0.1.7", features = ["static"] } # static bind lzma
zip = "2.2.0"

[target.'cfg(windows)'.dependencies]
Expand All @@ -101,7 +101,7 @@ winreg = "0.52.0"
# needed for keymanager. TODO: Find a way of creating a keymanager without bundling sqlite
chrono = "0.4.38"
device_query = "2.1.0"
libsqlite3-sys = {version = "0.25.1", features = ["bundled"]}
libsqlite3-sys = { version = "0.25.1", features = ["bundled"] }
log = "0.4.22"
nvml-wrapper = "0.10.0"
rand = "0.8.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ const MoneroAddressEditor = ({ initialAddress, onApply }: MoneroAddressEditorPro
</IconButton>
</>
) : (
<IconButton onClick={() => copyToClipboard(address)}>
<IconButton
onClick={(e) => {
e.preventDefault();
copyToClipboard(address);
}}
>
{!isCopied ? <IoCopyOutline /> : <IoCheckmarkOutline />}
</IconButton>
)}
Expand Down

0 comments on commit 42ede56

Please sign in to comment.