translate to/from TransactionV2 correctly in owner api and foreign api

This commit is contained in:
antiochp
2019-08-19 16:35:54 +01:00
parent 3c45dad846
commit ec3d08a710
6 changed files with 72 additions and 55 deletions
+3 -2
View File
@@ -14,10 +14,11 @@
//! Types specific to the wallet api, mostly argument serialization
use crate::grin_core::core::{Output, TxKernel};
use crate::grin_core::core::Output;
use crate::grin_core::libtx::secp_ser;
use crate::grin_keychain::Identifier;
use crate::grin_util::secp::pedersen;
use crate::slate_versions::v2::TxKernelV2;
use crate::slate_versions::SlateVersion;
use crate::types::OutputData;
@@ -185,7 +186,7 @@ pub struct CbData {
/// Output
pub output: Output,
/// Kernel
pub kernel: TxKernel,
pub kernel: TxKernelV2,
/// Key Id
pub key_id: Option<Identifier>,
}
+2 -1
View File
@@ -29,6 +29,7 @@ use crate::grin_util as util;
use crate::grin_util::secp::key::SecretKey;
use crate::grin_util::secp::pedersen;
use crate::internal::keys;
use crate::slate_versions::v2::TxKernelV2;
use crate::types::{
NodeClient, OutputData, OutputStatus, TxLogEntry, TxLogEntryType, WalletBackend, WalletInfo,
};
@@ -467,7 +468,7 @@ where
Ok(CbData {
output: out,
kernel: kern,
kernel: TxKernelV2::from(&kern),
key_id: block_fees.key_id,
})
}