Update index.ts

This commit is contained in:
boufni95 2025-06-26 22:24:45 +02:00 committed by GitHub
parent 123105e4c5
commit 910ae0cec4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,8 +88,7 @@ export default (mainHandler: Main): Types.ServerMethods => {
}, },
CloseChannel: async ({ ctx, req }) => { CloseChannel: async ({ ctx, req }) => {
const err = Types.CloseChannelRequestValidate(req, { const err = Types.CloseChannelRequestValidate(req, {
funding_txid_CustomCheck: chanId => chanId !== '', funding_txid_CustomCheck: chanId => chanId !== ''
sat_per_v_byte_CustomCheck: spv => spv > 0
}) })
if (err != null) throw new Error(err.message) if (err != null) throw new Error(err.message)
return mainHandler.adminManager.CloseChannel(req) return mainHandler.adminManager.CloseChannel(req)