From 2e89f33283e015c106bfcef475f24774e9c7c126 Mon Sep 17 00:00:00 2001 From: yeastplume Date: Tue, 5 Feb 2019 16:10:38 +0000 Subject: [PATCH 1/2] move slate from core to wallet crate --- core/src/libtx/error.rs | 16 +---- core/src/libtx/mod.rs | 1 - wallet/src/adapters/file.rs | 2 +- wallet/src/adapters/http.rs | 2 +- wallet/src/adapters/keybase.rs | 2 +- wallet/src/adapters/mod.rs | 2 +- wallet/src/adapters/null.rs | 2 +- wallet/src/controller.rs | 5 +- wallet/src/lib.rs | 1 + wallet/src/libwallet/api.rs | 2 +- wallet/src/libwallet/error.rs | 63 +++++++++---------- wallet/src/libwallet/internal/selection.rs | 3 +- wallet/src/libwallet/internal/tx.rs | 7 +-- wallet/src/libwallet/mod.rs | 1 + .../libtx => wallet/src/libwallet}/slate.rs | 12 ++-- wallet/src/libwallet/types.rs | 2 +- wallet/src/test_framework/testclient.rs | 2 +- wallet/tests/repost.rs | 2 +- wallet/tests/restore.rs | 2 +- wallet/tests/transaction.rs | 2 +- 20 files changed, 54 insertions(+), 77 deletions(-) rename {core/src/libtx => wallet/src/libwallet}/slate.rs (97%) diff --git a/core/src/libtx/error.rs b/core/src/libtx/error.rs index 68810fd154..89a1ecfb57 100644 --- a/core/src/libtx/error.rs +++ b/core/src/libtx/error.rs @@ -16,7 +16,7 @@ use failure::{Backtrace, Context, Fail}; use std::fmt::{self, Display}; -use crate::core::{committed, transaction}; +use crate::core::transaction; use crate::keychain; use crate::util::secp; @@ -44,12 +44,6 @@ pub enum ErrorKind { /// Rangeproof error #[fail(display = "Rangeproof Error")] RangeProof(String), - /// Fee error - #[fail(display = "Fee Error")] - Fee(String), - /// Error from summing commitments via committed trait. - #[fail(display = "Committed Error")] - Committed(committed::Error), } impl Fail for Error { @@ -97,14 +91,6 @@ impl From for Error { } } -impl From for Error { - fn from(error: committed::Error) -> Error { - Error { - inner: Context::new(ErrorKind::Committed(error)), - } - } -} - impl From for Error { fn from(error: keychain::Error) -> Error { Error { diff --git a/core/src/libtx/mod.rs b/core/src/libtx/mod.rs index a9c802b039..e48047e67d 100644 --- a/core/src/libtx/mod.rs +++ b/core/src/libtx/mod.rs @@ -27,7 +27,6 @@ mod error; pub mod proof; pub mod reward; pub mod secp_ser; -pub mod slate; use crate::consensus; use crate::core::Transaction; diff --git a/wallet/src/adapters/file.rs b/wallet/src/adapters/file.rs index 41c8aaaffe..0fd305cce3 100644 --- a/wallet/src/adapters/file.rs +++ b/wallet/src/adapters/file.rs @@ -16,7 +16,7 @@ use std::fs::File; use std::io::{Read, Write}; -use crate::core::libtx::slate::Slate; +use crate::libwallet::slate::Slate; use crate::libwallet::{Error, ErrorKind}; use crate::{WalletCommAdapter, WalletConfig}; use serde_json as json; diff --git a/wallet/src/adapters/http.rs b/wallet/src/adapters/http.rs index 03e36826a6..31ce97f77e 100644 --- a/wallet/src/adapters/http.rs +++ b/wallet/src/adapters/http.rs @@ -14,7 +14,7 @@ use crate::api; use crate::controller; -use crate::core::libtx::slate::Slate; +use crate::libwallet::slate::Slate; use crate::libwallet::{Error, ErrorKind}; use crate::{instantiate_wallet, HTTPNodeClient, WalletCommAdapter, WalletConfig}; /// HTTP Wallet 'plugin' implementation diff --git a/wallet/src/adapters/keybase.rs b/wallet/src/adapters/keybase.rs index 2e411919df..2cac127fb8 100644 --- a/wallet/src/adapters/keybase.rs +++ b/wallet/src/adapters/keybase.rs @@ -15,7 +15,7 @@ // Keybase Wallet Plugin use crate::controller; -use crate::core::libtx::slate::Slate; +use crate::libwallet::slate::Slate; use crate::libwallet::{Error, ErrorKind}; use crate::{instantiate_wallet, HTTPNodeClient, WalletCommAdapter, WalletConfig}; use failure::ResultExt; diff --git a/wallet/src/adapters/mod.rs b/wallet/src/adapters/mod.rs index 88f028a270..c42b096474 100644 --- a/wallet/src/adapters/mod.rs +++ b/wallet/src/adapters/mod.rs @@ -22,7 +22,7 @@ pub use self::http::HTTPWalletCommAdapter; pub use self::keybase::KeybaseWalletCommAdapter; pub use self::null::NullWalletCommAdapter; -use crate::core::libtx::slate::Slate; +use crate::libwallet::slate::Slate; use crate::libwallet::Error; use crate::WalletConfig; use std::collections::HashMap; diff --git a/wallet/src/adapters/null.rs b/wallet/src/adapters/null.rs index 18ee73bea9..9ac7500ee8 100644 --- a/wallet/src/adapters/null.rs +++ b/wallet/src/adapters/null.rs @@ -13,7 +13,7 @@ // limitations under the License. /// Null Output 'plugin' implementation -use crate::core::libtx::slate::Slate; +use crate::libwallet::slate::Slate; use crate::libwallet::Error; use crate::{WalletCommAdapter, WalletConfig}; diff --git a/wallet/src/controller.rs b/wallet/src/controller.rs index cad0a9bdd5..a945f95d45 100644 --- a/wallet/src/controller.rs +++ b/wallet/src/controller.rs @@ -19,7 +19,7 @@ use crate::adapters::{FileWalletCommAdapter, HTTPWalletCommAdapter, KeybaseWalle use crate::api::{ApiServer, BasicAuthMiddleware, Handler, ResponseFuture, Router, TLSConfig}; use crate::core::core; use crate::core::core::Transaction; -use crate::core::libtx::slate::Slate; +use crate::libwallet::slate::Slate; use crate::keychain::Keychain; use crate::libwallet::api::{APIForeign, APIOwner}; use crate::libwallet::types::{ @@ -344,8 +344,7 @@ where match e.kind() { // user errors, don't backtrace ErrorKind::NotEnoughFunds { .. } => {} - ErrorKind::FeeDispute { .. } => {} - ErrorKind::FeeExceedsAmount { .. } => {} + ErrorKind::Fee { .. } => {} _ => { // otherwise give full dump error!("Backtrace: {}", e.backtrace().unwrap()); diff --git a/wallet/src/lib.rs b/wallet/src/lib.rs index 1e50768466..1569929f26 100644 --- a/wallet/src/lib.rs +++ b/wallet/src/lib.rs @@ -46,6 +46,7 @@ pub use crate::adapters::{ WalletCommAdapter, }; pub use crate::error::{Error, ErrorKind}; +pub use crate::libwallet::slate::Slate; pub use crate::libwallet::types::{ BlockFees, CbData, NodeClient, WalletBackend, WalletInfo, WalletInst, }; diff --git a/wallet/src/libwallet/api.rs b/wallet/src/libwallet/api.rs index fbe857bfb3..e099b502a8 100644 --- a/wallet/src/libwallet/api.rs +++ b/wallet/src/libwallet/api.rs @@ -36,7 +36,7 @@ use uuid::Uuid; use crate::core::core::hash::Hashed; use crate::core::core::Transaction; -use crate::core::libtx::slate::Slate; +use crate::libwallet::slate::Slate; use crate::core::ser; use crate::keychain::{Identifier, Keychain}; use crate::libwallet::internal::{keys, tx, updater}; diff --git a/wallet/src/libwallet/error.rs b/wallet/src/libwallet/error.rs index 867e7b63e0..491e78e09b 100644 --- a/wallet/src/libwallet/error.rs +++ b/wallet/src/libwallet/error.rs @@ -14,9 +14,10 @@ //! Error types for libwallet -use crate::core::core::transaction; +use crate::core::core::{committed, transaction}; use crate::core::libtx; use crate::keychain; +use crate::util::secp; use failure::{Backtrace, Context, Fail}; use std::env; use std::fmt::{self, Display}; @@ -47,37 +48,9 @@ pub enum ErrorKind { needed_disp: String, }, - /// Fee dispute - #[fail( - display = "Fee dispute: sender fee {}, recipient fee {}", - sender_fee_disp, recipient_fee_disp - )] - FeeDispute { - /// sender fee - sender_fee: u64, - /// display friendly - sender_fee_disp: String, - /// recipient fee - recipient_fee: u64, - /// display friendly - recipient_fee_disp: String, - }, - - /// Fee Exceeds amount - #[fail( - display = "Fee exceeds amount: sender amount {}, recipient fee {}", - sender_amount_disp, recipient_fee - )] - FeeExceedsAmount { - /// sender amount - sender_amount: u64, - /// display friendly - sender_amount_disp: String, - /// recipient fee - recipient_fee: u64, - /// display friendly - recipient_fee_disp: String, - }, + /// Fee error + #[fail(display = "Fee Error: {}", _0)] + Fee(String), /// LibTX Error #[fail(display = "LibTx Error")] @@ -97,7 +70,7 @@ pub enum ErrorKind { /// Secp Error #[fail(display = "Secp error")] - Secp, + Secp(secp::Error), /// Callback implementation error conversion #[fail(display = "Trait Implementation error")] @@ -140,8 +113,8 @@ pub enum ErrorKind { Uri, /// Signature error - #[fail(display = "Signature error")] - Signature(&'static str), + #[fail(display = "Signature error: {}", _0)] + Signature(String), /// Attempt to use duplicate transaction id in separate transactions #[fail(display = "Duplicate transaction ID error")] @@ -199,6 +172,10 @@ pub enum ErrorKind { #[fail(display = "Unknown Account Label '{}'", _0)] UnknownAccountLabel(String), + /// Error from summing commitments via committed trait. + #[fail(display = "Committed Error")] + Committed(committed::Error), + /// Other #[fail(display = "Generic error: {}", _0)] GenericError(String), @@ -305,3 +282,19 @@ impl From for Error { } } } + +impl From for Error { + fn from(error: secp::Error) -> Error { + Error { + inner: Context::new(ErrorKind::Secp(error)), + } + } +} + +impl From for Error { + fn from(error: committed::Error) -> Error { + Error { + inner: Context::new(ErrorKind::Committed(error)), + } + } +} diff --git a/wallet/src/libwallet/internal/selection.rs b/wallet/src/libwallet/internal/selection.rs index 379b133d2a..5b65f2fc69 100644 --- a/wallet/src/libwallet/internal/selection.rs +++ b/wallet/src/libwallet/internal/selection.rs @@ -15,7 +15,8 @@ //! Selection of inputs for building transactions use crate::core::core::{amount_to_hr_string, Transaction}; -use crate::core::libtx::{build, slate::Slate, tx_fee}; +use crate::libwallet::slate::Slate; +use crate::core::libtx::{build, tx_fee}; use crate::keychain::{Identifier, Keychain}; use crate::libwallet::error::{Error, ErrorKind}; use crate::libwallet::internal::keys; diff --git a/wallet/src/libwallet/internal/tx.rs b/wallet/src/libwallet/internal/tx.rs index cbcfb79b93..1e2cbe4976 100644 --- a/wallet/src/libwallet/internal/tx.rs +++ b/wallet/src/libwallet/internal/tx.rs @@ -16,7 +16,7 @@ use uuid::Uuid; -use crate::core::libtx::slate::Slate; +use crate::libwallet::slate::Slate; use crate::keychain::{Identifier, Keychain}; use crate::libwallet::internal::{selection, updater}; use crate::libwallet::types::{Context, NodeClient, OutputLockFn, TxLogEntryType, WalletBackend}; @@ -149,10 +149,7 @@ where participant_id, )?; // Final transaction can be built by anyone at this stage - let res = slate.finalize(wallet.keychain()); - if let Err(e) = res { - Err(ErrorKind::LibTX(e.kind()))? - } + slate.finalize(wallet.keychain())?; Ok(()) } diff --git a/wallet/src/libwallet/mod.rs b/wallet/src/libwallet/mod.rs index 3dcfc49c57..3faab94671 100644 --- a/wallet/src/libwallet/mod.rs +++ b/wallet/src/libwallet/mod.rs @@ -26,5 +26,6 @@ pub mod api; mod error; pub mod internal; pub mod types; +pub mod slate; pub use crate::libwallet::error::{Error, ErrorKind}; diff --git a/core/src/libtx/slate.rs b/wallet/src/libwallet/slate.rs similarity index 97% rename from core/src/libtx/slate.rs rename to wallet/src/libwallet/slate.rs index 85d91bef52..21e2d4e340 100644 --- a/core/src/libtx/slate.rs +++ b/wallet/src/libwallet/slate.rs @@ -16,13 +16,13 @@ //! around during an interactive wallet exchange use crate::blake2::blake2b::blake2b; -use crate::core::amount_to_hr_string; -use crate::core::committed::Committed; -use crate::core::transaction::{kernel_features, kernel_sig_msg, Transaction, Weighting}; -use crate::core::verifier_cache::LruVerifierCache; +use grin_core::core::amount_to_hr_string; +use grin_core::core::committed::Committed; +use grin_core::core::transaction::{kernel_features, kernel_sig_msg, Transaction, Weighting}; +use grin_core::core::verifier_cache::LruVerifierCache; use crate::keychain::{BlindSum, BlindingFactor, Keychain}; -use crate::libtx::error::{Error, ErrorKind}; -use crate::libtx::{aggsig, build, secp_ser, tx_fee}; +use grin_core::libtx::{aggsig, build, secp_ser, tx_fee}; +use crate::libwallet::error::{Error, ErrorKind}; use crate::util::secp; use crate::util::secp::key::{PublicKey, SecretKey}; use crate::util::secp::Signature; diff --git a/wallet/src/libwallet/types.rs b/wallet/src/libwallet/types.rs index 15e563126c..9ceee2399e 100644 --- a/wallet/src/libwallet/types.rs +++ b/wallet/src/libwallet/types.rs @@ -25,7 +25,7 @@ use crate::util::secp::key::{PublicKey, SecretKey}; use crate::util::secp::{self, pedersen, Secp256k1}; use chrono::prelude::*; use failure::ResultExt; -use grin_core::libtx::slate::ParticipantMessages; +use crate::libwallet::slate::ParticipantMessages; use serde; use serde_json; use std::collections::HashMap; diff --git a/wallet/src/test_framework/testclient.rs b/wallet/src/test_framework/testclient.rs index b6bb8fcaca..1298d5e035 100644 --- a/wallet/src/test_framework/testclient.rs +++ b/wallet/src/test_framework/testclient.rs @@ -21,7 +21,7 @@ use self::chain::Chain; use self::core::core::verifier_cache::LruVerifierCache; use self::core::core::Transaction; use self::core::global::{set_mining_mode, ChainTypes}; -use self::core::libtx::slate::Slate; +use crate::libwallet::slate::Slate; use self::core::{pow, ser}; use self::keychain::Keychain; use self::util::secp::pedersen; diff --git a/wallet/tests/repost.rs b/wallet/tests/repost.rs index 1712245de6..a1eeb054ae 100644 --- a/wallet/tests/repost.rs +++ b/wallet/tests/repost.rs @@ -17,7 +17,7 @@ extern crate log; use self::core::global; use self::core::global::ChainTypes; -use self::core::libtx::slate::Slate; +use self::libwallet::slate::Slate; use self::keychain::ExtKeychain; use self::wallet::test_framework::{self, LocalWalletClient, WalletProxy}; use self::wallet::{libwallet, FileWalletCommAdapter}; diff --git a/wallet/tests/restore.rs b/wallet/tests/restore.rs index 1b39b535d5..43cc5e9a2f 100644 --- a/wallet/tests/restore.rs +++ b/wallet/tests/restore.rs @@ -16,7 +16,7 @@ extern crate log; use self::core::global; use self::core::global::ChainTypes; -use self::core::libtx::slate::Slate; +use self::libwallet::slate::Slate; use self::keychain::{ExtKeychain, Identifier, Keychain}; use self::wallet::libwallet; use self::wallet::libwallet::types::AcctPathMapping; diff --git a/wallet/tests/transaction.rs b/wallet/tests/transaction.rs index c9840f6169..694d976ada 100644 --- a/wallet/tests/transaction.rs +++ b/wallet/tests/transaction.rs @@ -16,7 +16,7 @@ extern crate log; use self::core::global; use self::core::global::ChainTypes; -use self::core::libtx::slate::Slate; +use self::libwallet::slate::Slate; use self::keychain::ExtKeychain; use self::wallet::libwallet; use self::wallet::libwallet::types::OutputStatus; From 64fedb0e8c526f3028a8ccffe99ce53fa28a680c Mon Sep 17 00:00:00 2001 From: yeastplume Date: Tue, 5 Feb 2019 16:10:51 +0000 Subject: [PATCH 2/2] rustfmt --- wallet/src/controller.rs | 2 +- wallet/src/libwallet/api.rs | 2 +- wallet/src/libwallet/internal/selection.rs | 2 +- wallet/src/libwallet/internal/tx.rs | 2 +- wallet/src/libwallet/mod.rs | 2 +- wallet/src/libwallet/slate.rs | 10 +++++----- wallet/src/libwallet/types.rs | 2 +- wallet/src/test_framework/testclient.rs | 2 +- wallet/tests/repost.rs | 2 +- wallet/tests/restore.rs | 2 +- wallet/tests/transaction.rs | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/wallet/src/controller.rs b/wallet/src/controller.rs index a945f95d45..9bd584932d 100644 --- a/wallet/src/controller.rs +++ b/wallet/src/controller.rs @@ -19,9 +19,9 @@ use crate::adapters::{FileWalletCommAdapter, HTTPWalletCommAdapter, KeybaseWalle use crate::api::{ApiServer, BasicAuthMiddleware, Handler, ResponseFuture, Router, TLSConfig}; use crate::core::core; use crate::core::core::Transaction; -use crate::libwallet::slate::Slate; use crate::keychain::Keychain; use crate::libwallet::api::{APIForeign, APIOwner}; +use crate::libwallet::slate::Slate; use crate::libwallet::types::{ CbData, NodeClient, OutputData, SendTXArgs, TxLogEntry, WalletBackend, WalletInfo, }; diff --git a/wallet/src/libwallet/api.rs b/wallet/src/libwallet/api.rs index e099b502a8..5302e1f190 100644 --- a/wallet/src/libwallet/api.rs +++ b/wallet/src/libwallet/api.rs @@ -36,10 +36,10 @@ use uuid::Uuid; use crate::core::core::hash::Hashed; use crate::core::core::Transaction; -use crate::libwallet::slate::Slate; use crate::core::ser; use crate::keychain::{Identifier, Keychain}; use crate::libwallet::internal::{keys, tx, updater}; +use crate::libwallet::slate::Slate; use crate::libwallet::types::{ AcctPathMapping, BlockFees, CbData, NodeClient, OutputData, OutputLockFn, TxLogEntry, TxLogEntryType, TxWrapper, WalletBackend, WalletInfo, diff --git a/wallet/src/libwallet/internal/selection.rs b/wallet/src/libwallet/internal/selection.rs index 5b65f2fc69..c9e4b3d271 100644 --- a/wallet/src/libwallet/internal/selection.rs +++ b/wallet/src/libwallet/internal/selection.rs @@ -15,11 +15,11 @@ //! Selection of inputs for building transactions use crate::core::core::{amount_to_hr_string, Transaction}; -use crate::libwallet::slate::Slate; use crate::core::libtx::{build, tx_fee}; use crate::keychain::{Identifier, Keychain}; use crate::libwallet::error::{Error, ErrorKind}; use crate::libwallet::internal::keys; +use crate::libwallet::slate::Slate; use crate::libwallet::types::*; use std::collections::HashMap; use std::marker::PhantomData; diff --git a/wallet/src/libwallet/internal/tx.rs b/wallet/src/libwallet/internal/tx.rs index 1e2cbe4976..459885d4cb 100644 --- a/wallet/src/libwallet/internal/tx.rs +++ b/wallet/src/libwallet/internal/tx.rs @@ -16,9 +16,9 @@ use uuid::Uuid; -use crate::libwallet::slate::Slate; use crate::keychain::{Identifier, Keychain}; use crate::libwallet::internal::{selection, updater}; +use crate::libwallet::slate::Slate; use crate::libwallet::types::{Context, NodeClient, OutputLockFn, TxLogEntryType, WalletBackend}; use crate::libwallet::{Error, ErrorKind}; diff --git a/wallet/src/libwallet/mod.rs b/wallet/src/libwallet/mod.rs index 3faab94671..aa69b88457 100644 --- a/wallet/src/libwallet/mod.rs +++ b/wallet/src/libwallet/mod.rs @@ -25,7 +25,7 @@ pub mod api; mod error; pub mod internal; -pub mod types; pub mod slate; +pub mod types; pub use crate::libwallet::error::{Error, ErrorKind}; diff --git a/wallet/src/libwallet/slate.rs b/wallet/src/libwallet/slate.rs index 21e2d4e340..d062869804 100644 --- a/wallet/src/libwallet/slate.rs +++ b/wallet/src/libwallet/slate.rs @@ -16,17 +16,17 @@ //! around during an interactive wallet exchange use crate::blake2::blake2b::blake2b; -use grin_core::core::amount_to_hr_string; -use grin_core::core::committed::Committed; -use grin_core::core::transaction::{kernel_features, kernel_sig_msg, Transaction, Weighting}; -use grin_core::core::verifier_cache::LruVerifierCache; use crate::keychain::{BlindSum, BlindingFactor, Keychain}; -use grin_core::libtx::{aggsig, build, secp_ser, tx_fee}; use crate::libwallet::error::{Error, ErrorKind}; use crate::util::secp; use crate::util::secp::key::{PublicKey, SecretKey}; use crate::util::secp::Signature; use crate::util::RwLock; +use grin_core::core::amount_to_hr_string; +use grin_core::core::committed::Committed; +use grin_core::core::transaction::{kernel_features, kernel_sig_msg, Transaction, Weighting}; +use grin_core::core::verifier_cache::LruVerifierCache; +use grin_core::libtx::{aggsig, build, secp_ser, tx_fee}; use rand::thread_rng; use std::sync::Arc; use uuid::Uuid; diff --git a/wallet/src/libwallet/types.rs b/wallet/src/libwallet/types.rs index 9ceee2399e..81ef38f9c4 100644 --- a/wallet/src/libwallet/types.rs +++ b/wallet/src/libwallet/types.rs @@ -21,11 +21,11 @@ use crate::core::libtx::aggsig; use crate::core::ser; use crate::keychain::{Identifier, Keychain}; use crate::libwallet::error::{Error, ErrorKind}; +use crate::libwallet::slate::ParticipantMessages; use crate::util::secp::key::{PublicKey, SecretKey}; use crate::util::secp::{self, pedersen, Secp256k1}; use chrono::prelude::*; use failure::ResultExt; -use crate::libwallet::slate::ParticipantMessages; use serde; use serde_json; use std::collections::HashMap; diff --git a/wallet/src/test_framework/testclient.rs b/wallet/src/test_framework/testclient.rs index 1298d5e035..5e34a2d394 100644 --- a/wallet/src/test_framework/testclient.rs +++ b/wallet/src/test_framework/testclient.rs @@ -21,12 +21,12 @@ use self::chain::Chain; use self::core::core::verifier_cache::LruVerifierCache; use self::core::core::Transaction; use self::core::global::{set_mining_mode, ChainTypes}; -use crate::libwallet::slate::Slate; use self::core::{pow, ser}; use self::keychain::Keychain; use self::util::secp::pedersen; use self::util::secp::pedersen::Commitment; use self::util::{Mutex, RwLock, StopState}; +use crate::libwallet::slate::Slate; use crate::libwallet::types::*; use crate::{controller, libwallet, WalletCommAdapter, WalletConfig}; use failure::ResultExt; diff --git a/wallet/tests/repost.rs b/wallet/tests/repost.rs index a1eeb054ae..e24cd6f625 100644 --- a/wallet/tests/repost.rs +++ b/wallet/tests/repost.rs @@ -17,8 +17,8 @@ extern crate log; use self::core::global; use self::core::global::ChainTypes; -use self::libwallet::slate::Slate; use self::keychain::ExtKeychain; +use self::libwallet::slate::Slate; use self::wallet::test_framework::{self, LocalWalletClient, WalletProxy}; use self::wallet::{libwallet, FileWalletCommAdapter}; use grin_core as core; diff --git a/wallet/tests/restore.rs b/wallet/tests/restore.rs index 43cc5e9a2f..1c1b08373d 100644 --- a/wallet/tests/restore.rs +++ b/wallet/tests/restore.rs @@ -16,8 +16,8 @@ extern crate log; use self::core::global; use self::core::global::ChainTypes; -use self::libwallet::slate::Slate; use self::keychain::{ExtKeychain, Identifier, Keychain}; +use self::libwallet::slate::Slate; use self::wallet::libwallet; use self::wallet::libwallet::types::AcctPathMapping; use self::wallet::test_framework::{self, LocalWalletClient, WalletProxy}; diff --git a/wallet/tests/transaction.rs b/wallet/tests/transaction.rs index 694d976ada..e4b8b13587 100644 --- a/wallet/tests/transaction.rs +++ b/wallet/tests/transaction.rs @@ -16,8 +16,8 @@ extern crate log; use self::core::global; use self::core::global::ChainTypes; -use self::libwallet::slate::Slate; use self::keychain::ExtKeychain; +use self::libwallet::slate::Slate; use self::wallet::libwallet; use self::wallet::libwallet::types::OutputStatus; use self::wallet::test_framework::{self, LocalWalletClient, WalletProxy};