mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
wallet: remove WalletApi trait
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
pub mod cashierdb;
|
||||
pub mod wallet_api;
|
||||
pub mod walletdb;
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
use crate::{
|
||||
util::serial::{deserialize, serialize, Decodable, Encodable},
|
||||
Result,
|
||||
};
|
||||
|
||||
pub trait WalletApi {
|
||||
fn get_value_serialized<T: Encodable>(&self, data: &T) -> Result<Vec<u8>> {
|
||||
let v = serialize(data);
|
||||
Ok(v)
|
||||
}
|
||||
|
||||
fn get_value_deserialized<D: Decodable>(&self, key: Vec<u8>) -> Result<D> {
|
||||
let v: D = deserialize(&key)?;
|
||||
Ok(v)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user