From 0da56a9896f929398a11683b77383d149c3e91fd Mon Sep 17 00:00:00 2001 From: rileystephens28 Date: Fri, 8 Nov 2024 13:23:51 -0600 Subject: [PATCH] Accept zone arg in payment channel gap address getter --- src/wallet/qi-hdwallet.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) || [] ); }