File tree Expand file tree Collapse file tree
typescript/rebalancer/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,24 +196,26 @@ async function main(): Promise<void> {
196196 }
197197
198198 // Fail fast if config references protocol-specific inventory signer but key is missing
199- for ( const protocol of Object . values ( ProtocolType ) ) {
200- if (
201- rebalancerConfig . inventorySigners ?. [ protocol ] &&
202- ! inventoryPrivateKeys [ protocol ]
203- ) {
204- const envKey = `HYP_INVENTORY_KEY_${ protocol . toUpperCase ( ) } ` ;
205- const hint =
206- protocol === ProtocolType . Ethereum
207- ? `${ envKey } (or fallback HYP_INVENTORY_KEY)`
208- : envKey ;
209- logger . error (
210- {
211- inventorySigner :
212- rebalancerConfig . inventorySigners [ protocol ] ?. address ,
213- } ,
214- `Config specifies inventorySigners.${ protocol } but ${ hint } is not set.` ,
215- ) ;
216- process . exit ( 1 ) ;
199+ if ( ! monitorOnly ) {
200+ for ( const protocol of Object . values ( ProtocolType ) ) {
201+ if (
202+ rebalancerConfig . inventorySigners ?. [ protocol ] &&
203+ ! inventoryPrivateKeys [ protocol ]
204+ ) {
205+ const envKey = `HYP_INVENTORY_KEY_${ protocol . toUpperCase ( ) } ` ;
206+ const hint =
207+ protocol === ProtocolType . Ethereum
208+ ? `${ envKey } (or fallback HYP_INVENTORY_KEY)`
209+ : envKey ;
210+ logger . error (
211+ {
212+ inventorySigner :
213+ rebalancerConfig . inventorySigners [ protocol ] ?. address ,
214+ } ,
215+ `Config specifies inventorySigners.${ protocol } but ${ hint } is not set.` ,
216+ ) ;
217+ process . exit ( 1 ) ;
218+ }
217219 }
218220 }
219221
You can’t perform that action at this time.
0 commit comments