Skip to content

Commit

Permalink
Accept zone arg in payment channel gap address getter
Browse files Browse the repository at this point in the history
  • Loading branch information
rileystephens28 committed Nov 8, 2024
1 parent 3da7580 commit 01cb640
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/wallet/qi-hdwallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
[]
);
}
Expand Down

0 comments on commit 01cb640

Please sign in to comment.