wallet: remove WalletApi trait

This commit is contained in:
ghassmo
2022-04-26 00:35:32 +03:00
parent 1b2daf0a4e
commit b7ab02bcd9
2 changed files with 0 additions and 17 deletions

View File

@@ -1,3 +1,2 @@
pub mod cashierdb;
pub mod wallet_api;
pub mod walletdb;

View File

@@ -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)
}
}