mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-12-03 20:33:59 +01:00
Version Info API Function tweak, remove 'min_compat_version' from slate (#123)
* change slate version function to return list of supported slate formats * rustfmt * remove min_compat_version
This commit is contained in:
@@ -13,12 +13,14 @@
|
||||
// limitations under the License.
|
||||
|
||||
//! Generic implementation of owner API functions
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use crate::grin_keychain::Keychain;
|
||||
use crate::internal::{tx, updater};
|
||||
use crate::slate_versions::SlateVersion;
|
||||
use crate::{
|
||||
slate_versions, BlockFees, CbData, Error, ErrorKind, NodeClient, Slate, TxLogEntryType,
|
||||
VersionInfo, WalletBackend,
|
||||
BlockFees, CbData, Error, ErrorKind, NodeClient, Slate, TxLogEntryType, VersionInfo,
|
||||
WalletBackend,
|
||||
};
|
||||
|
||||
const FOREIGN_API_VERSION: u16 = 2;
|
||||
@@ -28,7 +30,7 @@ const USER_MESSAGE_MAX_LEN: usize = 256;
|
||||
pub fn check_version() -> VersionInfo {
|
||||
VersionInfo {
|
||||
foreign_api_version: FOREIGN_API_VERSION,
|
||||
default_slate_version: slate_versions::CURRENT_SLATE_VERSION,
|
||||
supported_slate_versions: SlateVersion::iter().collect(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ use crate::grin_core::core::{Output, TxKernel};
|
||||
use crate::grin_core::libtx::secp_ser;
|
||||
use crate::grin_keychain::Identifier;
|
||||
use crate::grin_util::secp::pedersen;
|
||||
use crate::slate_versions::SlateVersion;
|
||||
use crate::types::OutputData;
|
||||
|
||||
/// Send TX API Args
|
||||
@@ -218,5 +219,5 @@ pub struct VersionInfo {
|
||||
/// API version
|
||||
pub foreign_api_version: u16,
|
||||
/// Slate version
|
||||
pub default_slate_version: u16,
|
||||
pub supported_slate_versions: Vec<SlateVersion>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user