diff --git a/src/wallet/qi-hdwallet.ts b/src/wallet/qi-hdwallet.ts index bef5d5d9..b9bd53a4 100644 --- a/src/wallet/qi-hdwallet.ts +++ b/src/wallet/qi-hdwallet.ts @@ -1215,9 +1215,11 @@ export class QiHDWallet extends AbstractHDWallet { * @param {string} paymentCode - The payment code. * @returns {QiAddressInfo[]} The gap payment channel addresses for the payment code. */ - public getGapPaymentChannelAddresses(paymentCode: string): QiAddressInfo[] { + public getGapPaymentChannelAddressesForZone(paymentCode: string, zone: Zone): QiAddressInfo[] { return ( - this._addressesMap.get(paymentCode)?.filter((addressInfo) => addressInfo.status === AddressStatus.UNUSED) || + this._addressesMap + .get(paymentCode) + ?.filter((addressInfo) => addressInfo.status === AddressStatus.UNUSED && addressInfo.zone === zone) || [] ); }