diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 2dfd60a9130..4c3b633fe4e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1087,7 +1087,7 @@ bool CWallet::IsUsedDestination(const uint256& hash, unsigned int n) const if (GetDestData(wpkh_dest, "used", nullptr)) { return true; } - ScriptHash sh_wpkh_dest(wpkh_dest); + ScriptHash sh_wpkh_dest(GetScriptForDestination(wpkh_dest)); if (GetDestData(sh_wpkh_dest, "used", nullptr)) { return true; }