check failures lengh

This commit is contained in:
boufni95 2024-11-19 19:34:27 +00:00
parent 00cf5ab8f8
commit bdee3426ae

View file

@ -180,7 +180,7 @@ export class AdminManager {
async UpdateChannelPolicy(req: Types.UpdateChannelPolicyRequest): Promise<void> { async UpdateChannelPolicy(req: Types.UpdateChannelPolicyRequest): Promise<void> {
const chanPoint = req.update.type === Types.UpdateChannelPolicyRequest_update_type.CHANNEL_POINT ? req.update.channel_point : "" const chanPoint = req.update.type === Types.UpdateChannelPolicyRequest_update_type.CHANNEL_POINT ? req.update.channel_point : ""
const res = await this.lnd.UpdateChannelPolicy(chanPoint, req.policy) const res = await this.lnd.UpdateChannelPolicy(chanPoint, req.policy)
if (res.failedUpdates) { if (res.failedUpdates.length > 0) {
this.log(ERROR, "failed to update policy", res.failedUpdates) this.log(ERROR, "failed to update policy", res.failedUpdates)
throw new Error("failed to update policy") throw new Error("failed to update policy")
} }