diff --git a/.github/workflows/ci-nym-wallet-frontend.yml b/.github/workflows/ci-nym-wallet-frontend.yml index 174c72448a..93ce682d19 100644 --- a/.github/workflows/ci-nym-wallet-frontend.yml +++ b/.github/workflows/ci-nym-wallet-frontend.yml @@ -24,6 +24,9 @@ jobs: - name: Build TypeScript packages (wallet depends on @nymproject/types, etc.) run: yarn build:types + - name: Build @nymproject/mui-theme and @nymproject/react (wallet imports subpaths) + run: yarn build:packages + - name: Typecheck nym-wallet run: yarn --cwd nym-wallet tsc diff --git a/.github/workflows/ci-nym-wallet-rust.yml b/.github/workflows/ci-nym-wallet-rust.yml index e7e5b30b86..58d40a4fdd 100644 --- a/.github/workflows/ci-nym-wallet-rust.yml +++ b/.github/workflows/ci-nym-wallet-rust.yml @@ -41,6 +41,9 @@ jobs: sed -i.bak '1s/^/\[profile.dev\]\ndebug = false\n\n/' Cargo.toml git diff + - name: Ensure nym-wallet/dist exists for Tauri + run: mkdir -p nym-wallet/dist + - name: Build all binaries uses: actions-rs/cargo@v1 with: diff --git a/nym-wallet/src-tauri/src/error.rs b/nym-wallet/src-tauri/src/error.rs index a072b1745b..542def7d6b 100644 --- a/nym-wallet/src-tauri/src/error.rs +++ b/nym-wallet/src-tauri/src/error.rs @@ -13,9 +13,7 @@ use thiserror::Error; #[derive(Error, Debug)] pub enum BackendError { #[error(transparent)] - TypesError { - source: TypesError, - }, + TypesError { source: TypesError }, #[error(transparent)] Bip39Error { #[from] @@ -196,9 +194,7 @@ fn nyxd_error_is_vesting_contract_no_account(err: &NyxdError) -> bool { } match err { NyxdError::AbciError { - log, - pretty_log, - .. + log, pretty_log, .. } => { pretty_log .as_ref() diff --git a/nym-wallet/src-tauri/src/main.rs b/nym-wallet/src-tauri/src/main.rs index 1e21adf840..3aeb4e63f0 100644 --- a/nym-wallet/src-tauri/src/main.rs +++ b/nym-wallet/src-tauri/src/main.rs @@ -23,7 +23,6 @@ use crate::state::WalletState; mod config; mod error; mod log; -mod webview_theme; mod menu; mod network_config; mod operations; @@ -31,6 +30,7 @@ mod platform_constants; mod state; mod utils; mod wallet_storage; +mod webview_theme; #[allow(clippy::too_many_lines)] fn main() { diff --git a/nym-wallet/src-tauri/src/menu.rs b/nym-wallet/src-tauri/src/menu.rs index f762b75c2d..e4cd3393b0 100644 --- a/nym-wallet/src-tauri/src/menu.rs +++ b/nym-wallet/src-tauri/src/menu.rs @@ -16,7 +16,9 @@ pub fn build_app_menu(app: &AppHandle) -> tauri::Result> if std::env::var("NYM_WALLET_ENABLE_LOG").is_ok() { let help_text = MenuItemBuilder::with_id(SHOW_LOG_WINDOW, "Show logs").build(app)?; - let help_submenu = SubmenuBuilder::new(app, "Help").items(&[&help_text]).build()?; + let help_submenu = SubmenuBuilder::new(app, "Help") + .items(&[&help_text]) + .build()?; menu_builder = menu_builder.item(&help_submenu); } diff --git a/nym-wallet/src-tauri/src/operations/app/link.rs b/nym-wallet/src-tauri/src/operations/app/link.rs index c35af74368..e327d8f74c 100644 --- a/nym-wallet/src-tauri/src/operations/app/link.rs +++ b/nym-wallet/src-tauri/src/operations/app/link.rs @@ -39,13 +39,13 @@ mod tests { "data:text/html,hi", "ftp://example.com/", ] { - let res = validate_open_url_scheme(url); - assert!(res.is_err(), "expected reject: {url}"); - let msg = res.unwrap_err(); - assert!( - msg.contains("not allowed") || msg.contains("Invalid URL"), - "{url}: {msg}" - ); + let res = validate_open_url_scheme(url); + assert!(res.is_err(), "expected reject: {url}"); + let msg = res.unwrap_err(); + assert!( + msg.contains("not allowed") || msg.contains("Invalid URL"), + "{url}: {msg}" + ); } } }