aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-07-27 16:55:14 -0400
committerluigi1111 <luigi1111w@gmail.com>2021-07-27 16:55:14 -0400
commit2d5b8a6ff7b70ae5af1b69ec6a9fcfba621212cd (patch)
treebec778dd1f21ba855bbe821ab8da5611dc9f4689
parentMerge pull request #7718 (diff)
parentwallet: Reset RPC Pay ID on node switch (diff)
downloadmonero-2d5b8a6ff7b70ae5af1b69ec6a9fcfba621212cd.tar.xz
Merge pull request #7740
8cea9d8 wallet: Reset RPC Pay ID on node switch (tobtoht)
-rw-r--r--src/wallet/wallet2.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 05fe0a1ad..133db6c2a 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1320,6 +1320,9 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u
m_trusted_daemon = trusted_daemon;
if (changed)
{
+ if (!m_persistent_rpc_client_id) {
+ set_rpc_client_secret_key(rct::rct2sk(rct::skGen()));
+ }
m_rpc_payment_state.expected_spent = 0;
m_rpc_payment_state.discrepancy = 0;
m_node_rpc_proxy.invalidate();