|
@@ -4,7 +4,6 @@ use crate::{
|
|
|
config::Config,
|
|
|
status::{InternalStatus, StatusManager},
|
|
|
storage::{AccountTransactionType, Batch, ReceivedPaymentStatus, Storage},
|
|
|
- token::TokenManager,
|
|
|
transaction::{Error as TxError, Type},
|
|
|
worker::WorkerManager,
|
|
|
AccountId, Amount, Error, Filter, PaymentFrom, PaymentId, RevId, Status, Tag, Transaction,
|
|
@@ -20,7 +19,6 @@ where
|
|
|
S: Storage + Sync + Send,
|
|
|
{
|
|
|
config: Config<S>,
|
|
|
- token_manager: TokenManager,
|
|
|
broadcaster: WorkerManager<Broadcaster>,
|
|
|
}
|
|
|
|
|
@@ -32,7 +30,6 @@ where
|
|
|
pub fn new(config: Config<S>) -> Arc<Self> {
|
|
|
Arc::new(Self {
|
|
|
config,
|
|
|
- token_manager: TokenManager(b"test".to_vec()),
|
|
|
broadcaster: WorkerManager::new(Broadcaster::default()),
|
|
|
})
|
|
|
}
|
|
@@ -279,7 +276,8 @@ where
|
|
|
.revision
|
|
|
.locked
|
|
|
{
|
|
|
- self.token_manager
|
|
|
+ self.config
|
|
|
+ .token_manager
|
|
|
.verify(lock_token, &transaction.revision.update_token)?
|
|
|
}
|
|
|
}
|
|
@@ -502,7 +500,7 @@ where
|
|
|
.await?
|
|
|
.pop()
|
|
|
.ok_or(Error::TxNotFound)?
|
|
|
- .lock_transaction(&self.token_manager)?;
|
|
|
+ .lock_transaction(&self.config.token_manager)?;
|
|
|
self.store(new_revision).await?;
|
|
|
Ok(secret)
|
|
|
}
|