diff --git a/packages/bitcore-wallet-client/src/lib/api.ts b/packages/bitcore-wallet-client/src/lib/api.ts index b1f56b8d7d9..d8a0d7a6831 100644 --- a/packages/bitcore-wallet-client/src/lib/api.ts +++ b/packages/bitcore-wallet-client/src/lib/api.ts @@ -3176,6 +3176,9 @@ export class API extends EventEmitter { ? Constants.SCRIPT_TYPES.P2WPKH : Constants.SCRIPT_TYPES.P2WSH; } + if (wallet.opts.coin === 'btc' && wallet.status.wallet.addressType === 'P2TR') { + client.credentials.addressType = Constants.SCRIPT_TYPES.P2TR; + } // add client to list let newClient = _.cloneDeep(client); // newClient.credentials = settings.credentials; diff --git a/packages/bitcore-wallet-client/src/lib/common/utils.ts b/packages/bitcore-wallet-client/src/lib/common/utils.ts index d7a790e506c..174970c1bf3 100644 --- a/packages/bitcore-wallet-client/src/lib/common/utils.ts +++ b/packages/bitcore-wallet-client/src/lib/common/utils.ts @@ -393,6 +393,7 @@ export class Utils { break; case Constants.SCRIPT_TYPES.P2WPKH: case Constants.SCRIPT_TYPES.P2PKH: + case Constants.SCRIPT_TYPES.P2TR: t.from(txp.inputs); break; }