diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 880d339cd3..6c749de90c 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -6239,7 +6239,7 @@ UniValue issueasset(const JSONRPCRequest& request) if (!pwallet->GetKeyFromPool(newKey)) { throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); } - asset_dest = PKHash(newKey.GetID()); + asset_dest = WitnessV0KeyHash(newKey.GetID()); pwallet->SetAddressBook(asset_dest, "", "receive"); asset_dest_blindpub = pwallet->GetBlindingPubKey(GetScriptForDestination(asset_dest)); } @@ -6247,7 +6247,7 @@ UniValue issueasset(const JSONRPCRequest& request) if (!pwallet->GetKeyFromPool(newKey)) { throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); } - token_dest = PKHash(newKey.GetID()); + token_dest = WitnessV0KeyHash(newKey.GetID()); pwallet->SetAddressBook(token_dest, "", "receive"); token_dest_blindpub = pwallet->GetBlindingPubKey(GetScriptForDestination(token_dest)); } @@ -6346,7 +6346,7 @@ UniValue reissueasset(const JSONRPCRequest& request) if (!pwallet->GetKeyFromPool(newAssetKey)) { throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); } - CTxDestination asset_dest = PKHash(newAssetKey.GetID()); + CTxDestination asset_dest = WitnessV0KeyHash(newAssetKey.GetID()); pwallet->SetAddressBook(asset_dest, "", "receive"); CPubKey asset_dest_blindpub = pwallet->GetBlindingPubKey(GetScriptForDestination(asset_dest)); @@ -6355,7 +6355,7 @@ UniValue reissueasset(const JSONRPCRequest& request) if (!pwallet->GetKeyFromPool(newTokenKey)) { throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); } - CTxDestination token_dest = PKHash(newTokenKey.GetID()); + CTxDestination token_dest = WitnessV0KeyHash(newTokenKey.GetID()); pwallet->SetAddressBook(token_dest, "", "receive"); CPubKey token_dest_blindpub = pwallet->GetBlindingPubKey(GetScriptForDestination(token_dest));