mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-23 18:18:31 +02:00
respect slate version
This commit is contained in:
@@ -42,9 +42,9 @@ use crate::{
|
||||
address, contract,
|
||||
mwixnet::{create_onion, ComSignature, Hop, MixnetReqCreationParams, SwapReq},
|
||||
wallet_lock, BuiltOutput, Error, InitTxArgs, IssueInvoiceTxArgs, NodeHeightResult,
|
||||
OutputCommitMapping, PaymentProof, RetrieveTxQueryArgs, ScannedBlockInfo, Slatepack,
|
||||
SlatepackAddress, Slatepacker, SlatepackerArgs, TxLogEntryType, ViewWallet, WalletBackend,
|
||||
WalletInitStatus, WalletInst, WalletLCProvider,
|
||||
OutputCommitMapping, PaymentProof, RetrieveTxQueryArgs, ScannedBlockInfo, SlateVersion,
|
||||
Slatepack, SlatepackAddress, Slatepacker, SlatepackerArgs, TxLogEntryType, ViewWallet,
|
||||
WalletBackend, WalletInitStatus, WalletInst, WalletLCProvider,
|
||||
};
|
||||
use ed25519_dalek::SigningKey as DalekSecretKey;
|
||||
use ed25519_dalek::Verifier;
|
||||
@@ -675,6 +675,10 @@ where
|
||||
C: NodeClient,
|
||||
K: Keychain,
|
||||
{
|
||||
if let Some(v) = args.target_slate_version {
|
||||
SlateVersion::try_from(v)?;
|
||||
}
|
||||
|
||||
let payment_proof_address = if let Some(a) = &args.payment_proof_recipient_address {
|
||||
if a.valid_network() {
|
||||
Some(a)
|
||||
@@ -801,6 +805,10 @@ where
|
||||
C: NodeClient,
|
||||
K: Keychain,
|
||||
{
|
||||
if let Some(v) = args.target_slate_version {
|
||||
SlateVersion::try_from(v)?;
|
||||
}
|
||||
|
||||
let parent_key_id = match args.dest_acct_name {
|
||||
Some(d) => {
|
||||
let pm = w.get_acct_path(d)?;
|
||||
|
||||
@@ -72,8 +72,7 @@ pub struct InitTxArgs {
|
||||
#[serde(default = "default_refresh_outputs_from_node")]
|
||||
pub refresh_outputs_from_node: bool,
|
||||
/// Optionally set the output target slate version (acceptable
|
||||
/// down to the minimum slate version compatible with the current. If `None` the slate
|
||||
/// is generated with the latest version.
|
||||
/// down to the minimum slate version compatible with the current. If `None`, V4 is used.
|
||||
pub target_slate_version: Option<u16>,
|
||||
/// Number of blocks from current after which TX should be ignored
|
||||
#[serde(with = "secp_ser::opt_string_or_u64")]
|
||||
@@ -142,8 +141,7 @@ pub struct IssueInvoiceTxArgs {
|
||||
#[serde(with = "secp_ser::string_or_u64")]
|
||||
pub amount: u64,
|
||||
/// Optionally set the output target slate version (acceptable
|
||||
/// down to the minimum slate version compatible with the current. If `None` the slate
|
||||
/// is generated with the latest version.
|
||||
/// down to the minimum slate version compatible with the current. If `None`, V4 is used.
|
||||
pub target_slate_version: Option<u16>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user