diff --git a/Cargo.lock b/Cargo.lock index 53c29cc813..99d8e9a55c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -111,12 +111,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.2" @@ -343,28 +337,16 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitvec" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" -dependencies = [ - "funty 1.1.0", - "radium 0.6.2", - "tap", - "wyz 0.2.0", -] - [[package]] name = "bitvec" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty 2.0.0", - "radium 0.7.0", + "funty", + "radium", "tap", - "wyz 0.5.0", + "wyz", ] [[package]] @@ -386,7 +368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec", "cc", "cfg-if 1.0.0", "constant_time_eq", @@ -473,12 +455,6 @@ version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" -[[package]] -name = "byte-slice-cast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" - [[package]] name = "byte-tools" version = "0.3.1" @@ -797,12 +773,6 @@ dependencies = [ "cosmwasm-std", ] -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "cookie" version = "0.16.0" @@ -1368,19 +1338,6 @@ dependencies = [ "const-oid", ] -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn", -] - [[package]] name = "devise" version = "0.3.1" @@ -1467,7 +1424,7 @@ dependencies = [ name = "dkg" version = "0.1.0" dependencies = [ - "bitvec 1.0.1", + "bitvec", "bls12_381 0.6.0", "bs58", "criterion", @@ -1658,49 +1615,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "ethabi" -version = "14.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01317735d563b3bad2d5f90d2e1799f414165408251abb762510f40e790e69a" -dependencies = [ - "anyhow", - "ethereum-types", - "hex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-rlp", - "impl-serde", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64b5df66a228d85e4b17e5d6c6aa43b0310898ffe8a85988c4c032357aaabfd" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-rlp", - "impl-serde", - "primitive-types", - "uint", -] - [[package]] name = "event-listener" version = "2.5.3" @@ -1809,18 +1723,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "fixed-hash" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" -dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", - "static_assertions", -] - [[package]] name = "flate2" version = "1.0.24" @@ -1920,12 +1822,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "funty" version = "2.0.0" @@ -2014,12 +1910,6 @@ version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" -[[package]] -name = "futures-timer" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" - [[package]] name = "futures-util" version = "0.3.24" @@ -2065,7 +1955,6 @@ dependencies = [ "nymsphinx", "pemstore", "rand 0.7.3", - "secp256k1", "task", "thiserror", "tokio", @@ -2077,7 +1966,6 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "wasm-utils", - "web3", ] [[package]] @@ -2255,7 +2143,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.7.4", + "tokio-util", "tracing", ] @@ -2621,44 +2509,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "impl-codec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" -dependencies = [ - "serde", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "inclusion-probability" version = "0.1.0" @@ -2794,21 +2644,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonrpc-core" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" -dependencies = [ - "futures", - "futures-executor", - "futures-util", - "log", - "serde", - "serde_derive", - "serde_json", -] - [[package]] name = "k256" version = "0.10.4" @@ -3035,7 +2870,7 @@ dependencies = [ "log", "nymsphinx", "tokio", - "tokio-util 0.7.4", + "tokio-util", ] [[package]] @@ -3074,7 +2909,7 @@ dependencies = [ "serde", "task", "tokio", - "tokio-util 0.7.4", + "tokio-util", "url", "validator-client", "version-checker", @@ -3096,7 +2931,7 @@ dependencies = [ "mime", "spin 0.9.4", "tokio", - "tokio-util 0.7.4", + "tokio-util", "version_check", ] @@ -3161,7 +2996,7 @@ dependencies = [ "slab", "tokio", "tokio-stream", - "tokio-util 0.7.4", + "tokio-util", "wasm-timer", ] @@ -3347,7 +3182,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-tungstenite 0.14.0", - "tokio-util 0.7.4", + "tokio-util", "url", "validator-api-requests", "validator-client", @@ -3386,7 +3221,7 @@ dependencies = [ "sysinfo", "task", "tokio", - "tokio-util 0.7.4", + "tokio-util", "toml", "topology", "url", @@ -3698,7 +3533,7 @@ dependencies = [ "bytes", "nymsphinx-params", "nymsphinx-types", - "tokio-util 0.7.4", + "tokio-util", ] [[package]] @@ -3828,32 +3663,6 @@ dependencies = [ "group 0.11.0", ] -[[package]] -name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.2", - "bitvec 0.20.4", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "parking_lot" version = "0.11.2" @@ -4153,30 +3962,6 @@ dependencies = [ "log", ] -[[package]] -name = "primitive-types" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06345ee39fbccfb06ab45f3a1a5798d9dafa04cb8921a76d227040003a234b0e" -dependencies = [ - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" -dependencies = [ - "once_cell", - "thiserror", - "toml", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -4301,7 +4086,7 @@ dependencies = [ "task", "tokio", "tokio-test", - "tokio-util 0.7.4", + "tokio-util", ] [[package]] @@ -4339,12 +4124,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - [[package]] name = "radium" version = "0.7.0" @@ -4720,16 +4499,6 @@ dependencies = [ "opaque-debug 0.3.0", ] -[[package]] -name = "rlp" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" -dependencies = [ - "bytes", - "rustc-hex", -] - [[package]] name = "rocket" version = "0.5.0-rc.2" @@ -4763,7 +4532,7 @@ dependencies = [ "time 0.3.14", "tokio", "tokio-stream", - "tokio-util 0.7.4", + "tokio-util", "ubyte", "version_check", "yansi", @@ -4856,12 +4625,6 @@ dependencies = [ "syn", ] -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - [[package]] name = "rustc_version" version = "0.2.3" @@ -5027,24 +4790,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "secp256k1" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d03ceae636d0fed5bae6a7f4f664354c5f4fcedf6eef053fef17e49f837d0a" -dependencies = [ - "secp256k1-sys", -] - -[[package]] -name = "secp256k1-sys" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" -dependencies = [ - "cc", -] - [[package]] name = "security-framework" version = "2.7.0" @@ -5411,21 +5156,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "soketto" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4919971d141dbadaa0e82b5d369e2d7666c98e4625046140615ca363e50d4daa" -dependencies = [ - "base64", - "bytes", - "futures", - "httparse", - "log", - "rand 0.8.5", - "sha-1 0.9.8", -] - [[package]] name = "sphinx" version = "0.1.0" @@ -6036,15 +5766,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tinytemplate" version = "1.2.1" @@ -6138,7 +5859,7 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", - "tokio-util 0.7.4", + "tokio-util", ] [[package]] @@ -6179,21 +5900,6 @@ dependencies = [ "tungstenite 0.17.3", ] -[[package]] -name = "tokio-util" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" -dependencies = [ - "bytes", - "futures-core", - "futures-io", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-util" version = "0.7.4" @@ -6242,7 +5948,7 @@ dependencies = [ "prost-derive 0.11.0", "tokio", "tokio-stream", - "tokio-util 0.7.4", + "tokio-util", "tower", "tower-layer", "tower-service", @@ -6278,7 +5984,7 @@ dependencies = [ "rand 0.8.5", "slab", "tokio", - "tokio-util 0.7.4", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -6892,52 +6598,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "web3" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd24abe6f2b68e0677f843059faea87bcbd4892e39f02886f366d8222c3c540d" -dependencies = [ - "arrayvec 0.5.2", - "base64", - "bytes", - "derive_more", - "ethabi", - "ethereum-types", - "futures", - "futures-timer", - "headers", - "hex", - "jsonrpc-core", - "log", - "parking_lot 0.11.2", - "pin-project", - "reqwest", - "rlp", - "secp256k1", - "serde", - "serde_json", - "soketto", - "tiny-keccak", - "tokio", - "tokio-stream", - "tokio-util 0.6.10", - "url", - "web3-async-native-tls", -] - -[[package]] -name = "web3-async-native-tls" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f6d8d1636b2627fe63518d5a9b38a569405d9c9bc665c43c9c341de57227ebb" -dependencies = [ - "native-tls", - "thiserror", - "tokio", - "url", -] - [[package]] name = "webpki" version = "0.21.4" @@ -7111,12 +6771,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "wyz" version = "0.5.0" diff --git a/clients/client-core/Cargo.toml b/clients/client-core/Cargo.toml index fcedf3d9c6..ebe067b1e6 100644 --- a/clients/client-core/Cargo.toml +++ b/clients/client-core/Cargo.toml @@ -20,7 +20,8 @@ url = { version ="2.2", features = ["serde"] } # internal config = { path = "../../common/config" } crypto = { path = "../../common/crypto" } -gateway-client = { path = "../../common/client-libs/gateway-client", default-features = false, features = ["wasm", "coconut"] } +gateway-client = { path = "../../common/client-libs/gateway-client" } +#gateway-client = { path = "../../common/client-libs/gateway-client", default-features = false, features = ["wasm", "coconut"] } gateway-requests = { path = "../../gateway/gateway-requests" } nonexhaustive-delayqueue = { path = "../../common/nonexhaustive-delayqueue" } nymsphinx = { path = "../../common/nymsphinx" } @@ -48,14 +49,11 @@ features = ["futures"] [target."cfg(not(target_arch = \"wasm32\"))".dependencies.task] path = "../../common/task" - - [dev-dependencies] tempfile = "3.1.0" [features] -#wasm = ["gateway-client/wasm"] default = ["reply-surb"] -wasm = [] +wasm = ["gateway-client/wasm"] coconut = ["gateway-client/coconut", "gateway-requests/coconut"] reply-surb = ["sled"] \ No newline at end of file diff --git a/clients/client-core/src/client/mix_traffic.rs b/clients/client-core/src/client/mix_traffic.rs index 7b163a6997..cc1d0619ae 100644 --- a/clients/client-core/src/client/mix_traffic.rs +++ b/clients/client-core/src/client/mix_traffic.rs @@ -66,7 +66,7 @@ impl MixTrafficController { } #[cfg(not(target_arch = "wasm32"))] - pub async fn start_with_shutdown(mut self, mut shutdown: task::ShutdownListener) { + pub fn start_with_shutdown(mut self, mut shutdown: task::ShutdownListener) { spawn_future(async move { debug!("Started MixTrafficController with graceful shutdown support"); diff --git a/clients/client-core/src/client/topology_control.rs b/clients/client-core/src/client/topology_control.rs index 237f3a1715..155ae6bd3f 100644 --- a/clients/client-core/src/client/topology_control.rs +++ b/clients/client-core/src/client/topology_control.rs @@ -304,7 +304,7 @@ impl TopologyRefresher { } #[cfg(not(target_arch = "wasm32"))] - pub async fn start_with_shutdown(mut self, mut shutdown: task::ShutdownListener) { + pub fn start_with_shutdown(mut self, mut shutdown: task::ShutdownListener) { spawn_future(async move { debug!("Started TopologyRefresher with graceful shutdown support"); diff --git a/clients/native/src/client/mod.rs b/clients/native/src/client/mod.rs index 43de8f2d0e..3ad6addfe0 100644 --- a/clients/native/src/client/mod.rs +++ b/clients/native/src/client/mod.rs @@ -100,9 +100,8 @@ impl NymClient { mix_tx, self.as_mix_recipient(), topology_accessor, - shutdown, ) - .start(); + .start_with_shutdown(shutdown); } fn start_real_traffic_controller( @@ -133,9 +132,8 @@ impl NymClient { mix_sender, topology_accessor, reply_key_storage, - shutdown, ) - .start(); + .start_with_shutdown(shutdown); } // buffer controlling all messages fetched from provider @@ -153,9 +151,8 @@ impl NymClient { query_receiver, mixnet_receiver, reply_key_storage, - shutdown, ) - .start() + .start_with_shutdown(shutdown) } async fn start_gateway_client( @@ -245,7 +242,7 @@ impl NymClient { } info!("Starting topology refresher..."); - topology_refresher.start(shutdown); + topology_refresher.start_with_shutdown(shutdown); } // controller for sending sphinx packets to mixnet (either real traffic or cover traffic) @@ -259,7 +256,7 @@ impl NymClient { shutdown: ShutdownListener, ) { info!("Starting mix traffic controller..."); - MixTrafficController::new(mix_rx, gateway_client, shutdown).start(); + MixTrafficController::new(mix_rx, gateway_client).start_with_shutdown(shutdown); } fn start_websocket_listener( diff --git a/clients/socks5/src/client/mod.rs b/clients/socks5/src/client/mod.rs index f90191a087..ce89c29a26 100644 --- a/clients/socks5/src/client/mod.rs +++ b/clients/socks5/src/client/mod.rs @@ -101,9 +101,8 @@ impl NymClient { mix_tx, self.as_mix_recipient(), topology_accessor, - shutdown, ) - .start(); + .start_with_shutdown(shutdown); } fn start_real_traffic_controller( @@ -134,9 +133,8 @@ impl NymClient { mix_sender, topology_accessor, reply_key_storage, - shutdown, ) - .start(); + .start_with_shutdown(shutdown); } // buffer controlling all messages fetched from provider @@ -154,9 +152,8 @@ impl NymClient { query_receiver, mixnet_receiver, reply_key_storage, - shutdown, ) - .start() + .start_with_shutdown(shutdown); } async fn start_gateway_client( @@ -246,7 +243,7 @@ impl NymClient { } info!("Starting topology refresher..."); - topology_refresher.start(shutdown); + topology_refresher.start_with_shutdown(shutdown); } // controller for sending sphinx packets to mixnet (either real traffic or cover traffic) @@ -260,7 +257,7 @@ impl NymClient { shutdown: ShutdownListener, ) { info!("Starting mix traffic controller..."); - MixTrafficController::new(mix_rx, gateway_client, shutdown).start(); + MixTrafficController::new(mix_rx, gateway_client).start_with_shutdown(shutdown); } fn start_socks5_listener( diff --git a/common/client-libs/gateway-client/Cargo.toml b/common/client-libs/gateway-client/Cargo.toml index 1bf0f92e3a..1bbb69b2b2 100644 --- a/common/client-libs/gateway-client/Cargo.toml +++ b/common/client-libs/gateway-client/Cargo.toml @@ -14,8 +14,6 @@ log = "0.4" thiserror = "1.0" url = "2.2" rand = { version = "0.7.3", features = ["wasm-bindgen"] } -secp256k1 = { version = "0.20.3", optional = true } -web3 = { version = "0.17.0", default-features = false, optional = true } async-trait = { version = "0.1.51" } # internal @@ -80,4 +78,3 @@ features = ["js"] [features] coconut = ["gateway-requests/coconut", "coconut-interface", "validator-client", "credentials/coconut"] wasm = [] -default = ["web3/default", "secp256k1"] diff --git a/common/client-libs/gateway-client/src/error.rs b/common/client-libs/gateway-client/src/error.rs index bda9352a3b..bb6f71f564 100644 --- a/common/client-libs/gateway-client/src/error.rs +++ b/common/client-libs/gateway-client/src/error.rs @@ -11,8 +11,6 @@ use thiserror::Error; use tungstenite::Error as WsError; #[cfg(target_arch = "wasm32")] use wasm_bindgen::JsValue; -#[cfg(not(feature = "coconut"))] -use web3::{contract::Error as Web3ContractError, Error as Web3Error}; #[derive(Debug, Error)] pub enum GatewayClientError { @@ -37,18 +35,6 @@ pub enum GatewayClientError { #[error("There was a network error")] NetworkErrorWasm(JsValue), - #[cfg(not(feature = "coconut"))] - #[error("Could not burn ERC20 token in Ethereum smart contract - {0}")] - BurnTokenError(#[from] Web3Error), - - #[cfg(not(feature = "coconut"))] - #[error("Could not run web3 contract - {0}")] - Web3ContractError(#[from] Web3ContractError), - - #[cfg(not(feature = "coconut"))] - #[error("Invalid Ethereum private key")] - InvalidEthereumPrivateKey, - #[error("Invalid URL - {0}")] InvalidURL(String),