I've been experimenting with this over the last couple of days... and I cannot replicate the issue (NOTE: I am using TestNet running with
-addresstype=legacy -changetype=legacy)
I created an empty wallet via the GUI ("Disable Private Keys" and "Make Blank Wallet" both CHECKED) and then used the following
importmulti commands:
Import "Receive":
importmulti '[{"range": [0,10], "timestamp": "now", "keypool": true, "watchonly": true, "desc":"pkh(tpubDCcc5nEEx6ucT4ZsFbcfQoQniLzLKKMCDWBJmCyE3pxdJB1FSFodzQHyugTT9jVye9JSw4Z1fh5G9muHGbxuWCKJ2FYLfwguAxxMRUfn614/0/*)#x7l9hvyy", "internal":false}]'
Import "Change":
importmulti '[{"range": [0,10], "timestamp": "now", "keypool": true, "watchonly": true, "desc":"pkh(tpubDCcc5nEEx6ucT4ZsFbcfQoQniLzLKKMCDWBJmCyE3pxdJB1FSFodzQHyugTT9jVye9JSw4Z1fh5G9muHGbxuWCKJ2FYLfwguAxxMRUfn614/1/*)#h26y2e5u", "internal":true}]'
Then used
rescanblockchain to pick up the transaction from this morning:
After that, I created an unsigned transaction sending 0.01 to "2N6Q5ThfiXBmCVtZctMrFdKh9NMKr4cvyNg" (no custom change address was specified)... which gave the following PSBT:
cHNidP8BAHUCAAAAAVwhQewlwfvoiFbIydddXePzvtLzxBkzOXASTZWtRMjjAAAAAAD9////AkBCDwAAAAAAF6kUkEZCuOxPJG3zAKLTIV1TEN0YKH2HYFOJAAAAAAAZdqkUgCugI7DhN6kQIULHp6jDpmO8+gKIrL7oHwAAAQC0AgAAAAL82FDhLhyM/oJXAJmphrqLdLwD4MhwFxmR3Hruy2n5TQEAAAAXFgAUsu40KEA0l7oQpkJB+ooQyjStqPv9////+KVvbXApkx7p35PrK7GPJXJ1iqVZftZIU7Nn6bMi9VkAAAAAAP3///8CgJaYAAAAAAAZdqkUuS49DijnI5Ot/mlEnLKoS24hzeqIrFNEhgAAAAAAFgAUJEZdVeL7wB0YpLnr2Pi4vfK0lhRn6B8AIgYCjv3jMS7f2EYTRRkhLQrPJNr2zE4NmKXC7XvKUPLOl9YMfjvIKQAAAAAAAAAAAAAiAgOyXgEY4CfaMolHM/xI8X0Kjiq3bED+NdPznEbcJyL4FQx+O8gpAQAAAAEAAAAA
Decoding that with
decodepsbt, we can see that the change generated is:
{
"value": 0.08999776,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 802ba023b0e137a9102142c7a7a8c3a663bcfa02 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914802ba023b0e137a9102142c7a7a8c3a663bcfa0288ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"msCf3mHLTXqrwyrnZVpzyZPkatzN5htrEb"
]
}
}
Which is a P2PKH output... and is the m/1/1 change address... which we can check using
getaddressinfo:
{
"address": "msCf3mHLTXqrwyrnZVpzyZPkatzN5htrEb",
"scriptPubKey": "76a914802ba023b0e137a9102142c7a7a8c3a663bcfa0288ac",
"ismine": false,
"solvable": true,
"desc": "pkh([7e3bc829/1/1]03b25e0118e027da32894733fc48f17d0a8e2ab76c40fe35d3f39c46dc2722f815)#9a8l6nhz",
"iswatchonly": true,
"isscript": false,
"iswitness": false,
"pubkey": "03b25e0118e027da32894733fc48f17d0a8e2ab76c40fe35d3f39c46dc2722f815",
"iscompressed": true,
"ischange": true,
"timestamp": 1630645010,
"hdkeypath": "m/1/1",
"hdseedid": "0000000000000000000000000000000000000000",
"hdmasterfingerprint": "7e3bc829",
"labels": [
]
}
I also tried creating a "descriptor" wallet... Again, using the "create wallet" option in the GUI but ticked all the boxes (disabled private keys, make blank wallet, and descriptor wallet)...
Then, imported the "external" descriptor:
importdescriptors '[{"desc":"pkh(tpubDCcc5nEEx6ucT4ZsFbcfQoQniLzLKKMCDWBJmCyE3pxdJB1FSFodzQHyugTT9jVye9JSw4Z1fh5G9muHGbxuWCKJ2FYLfwguAxxMRUfn614/0/*)#x7l9hvyy","active":true,"range":[0,10],"timestamp":1630566000,"internal":false}]'
and "internal" descriptor:
importdescriptors '[{"desc":"pkh(tpubDCcc5nEEx6ucT4ZsFbcfQoQniLzLKKMCDWBJmCyE3pxdJB1FSFodzQHyugTT9jVye9JSw4Z1fh5G9muHGbxuWCKJ2FYLfwguAxxMRUfn614/1/*)#h26y2e5u","active":true,"range":[0,10],"timestamp":1630566000,"internal":true}]'
After creating a PSBT that attempts to send out 0.01... and then decoding it, we again get:
{
"value": 0.08999776,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 802ba023b0e137a9102142c7a7a8c3a663bcfa02 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914802ba023b0e137a9102142c7a7a8c3a663bcfa0288ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"msCf3mHLTXqrwyrnZVpzyZPkatzN5htrEb"
]
}
}
Same change address as before...
Unfortunately, I don't have a coldcard to attempt to try and import the PSBT and see what the Coldcard says the address is... but, did you try decoding the PSBT with Bitcoin Core (
decodepsbt) and checking what the change address being generated is?
If the decoded PSBT looks OK in Bitcoin Core... then it's likely a Coldcard issue.
SIDE NOTE: Interestingly... "ismine" is "false" when checking the change address for the "legacy" wallet... but is "true" for the "descriptor" wallet.