Owner is optional, if not specified it will use the current wallet

This commit is contained in:
Doyle 2020-03-03 12:53:42 +11:00
parent 9b3a25326a
commit d54f117469
4 changed files with 7 additions and 7 deletions

View file

@ -6433,7 +6433,7 @@ bool simple_wallet::lns_buy_mapping(const std::vector<std::string>& args)
try
{
ptx_vector = m_wallet->lns_create_buy_mapping_tx(lns::mapping_type::session,
owner,
owner.size() ? &owner : nullptr,
backup_owner.size() ? &backup_owner : nullptr,
name,
value,

View file

@ -8538,7 +8538,7 @@ static lns_prepared_args prepare_tx_extra_loki_name_system_values(wallet2 const
}
std::vector<wallet2::pending_tx> wallet2::lns_create_buy_mapping_tx(lns::mapping_type type,
std::string const &owner,
std::string const *owner,
std::string const *backup_owner,
std::string const &name,
std::string const &value,
@ -8547,7 +8547,7 @@ std::vector<wallet2::pending_tx> wallet2::lns_create_buy_mapping_tx(lns::mapping
uint32_t account_index,
std::set<uint32_t> subaddr_indices)
{
lns_prepared_args prepared_args = prepare_tx_extra_loki_name_system_values(*this, type, priority, name, &value, &owner, backup_owner, false /*make_signature*/, reason);
lns_prepared_args prepared_args = prepare_tx_extra_loki_name_system_values(*this, type, priority, name, &value, owner, backup_owner, false /*make_signature*/, reason);
if (!prepared_args)
return {};
@ -8581,7 +8581,7 @@ std::vector<wallet2::pending_tx> wallet2::lns_create_buy_mapping_tx(lns::mapping
}
std::vector<wallet2::pending_tx> wallet2::lns_create_buy_mapping_tx(std::string const &type,
std::string const &owner,
std::string const *owner,
std::string const *backup_owner,
std::string const &name,
std::string const &value,

View file

@ -1538,8 +1538,8 @@ private:
pending_tx ptx;
};
request_stake_unlock_result can_request_stake_unlock(const crypto::public_key &sn_key);
std::vector<wallet2::pending_tx> lns_create_buy_mapping_tx(lns::mapping_type type, std::string const &owner, std::string const *backup_owner, std::string const &name, std::string const &value, std::string *reason, uint32_t priority = 0, uint32_t account_index = 0, std::set<uint32_t> subaddr_indices = {});
std::vector<wallet2::pending_tx> lns_create_buy_mapping_tx(std::string const &type, std::string const &owner, std::string const *backup_owner, std::string const &name, std::string const &value, std::string *reason, uint32_t priority = 0, uint32_t account_index = 0, std::set<uint32_t> subaddr_indices = {});
std::vector<wallet2::pending_tx> lns_create_buy_mapping_tx(lns::mapping_type type, std::string const *owner, std::string const *backup_owner, std::string const &name, std::string const &value, std::string *reason, uint32_t priority = 0, uint32_t account_index = 0, std::set<uint32_t> subaddr_indices = {});
std::vector<wallet2::pending_tx> lns_create_buy_mapping_tx(std::string const &type, std::string const *owner, std::string const *backup_owner, std::string const &name, std::string const &value, std::string *reason, uint32_t priority = 0, uint32_t account_index = 0, std::set<uint32_t> subaddr_indices = {});
// signature: (Optional) If set, use the signature given, otherwise by default derive the signature from the wallet spend key as an ed25519 key.
// The signature is derived from the hash of the previous txid blob and previous value blob of the mapping. By default this is signed using the wallet's spend key as an ed25519 keypair.

View file

@ -4292,7 +4292,7 @@ namespace tools
std::string reason;
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->lns_create_buy_mapping_tx(req.type,
req.owner,
req.owner.size() ? &req.owner : nullptr,
req.backup_owner.size() ? &req.backup_owner : nullptr,
req.name,
req.value,