File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -331,12 +331,14 @@ export class Relay {
331331 }
332332
333333 async ensureOperatorHasBalance ( ) {
334- if ( ! ConfigService . get ( 'READ_ONLY' ) ) {
335- const operator = this . clientMain . operatorAccountId ! . toString ( ) ;
336- const balance = await this . ethImpl . getBalance ( operator , 'latest' , { } as RequestDetails ) ;
337- if ( BigInt ( balance ) === BigInt ( 0 ) ) {
338- throw new Error ( `Operator account \`${ operator } \` has no balance` ) ;
339- }
334+ if ( ConfigService . get ( 'READ_ONLY' ) ) return ;
335+
336+ const operator = this . clientMain . operatorAccountId ! . toString ( ) ;
337+ const balance = BigInt ( await this . ethImpl . getBalance ( operator , 'latest' , { } as RequestDetails ) ) ;
338+ if ( balance === BigInt ( 0 ) ) {
339+ throw new Error ( `Operator account \`${ operator } \` has no balance` ) ;
340+ } else {
341+ this . logger . info ( `Operator account \`${ operator } \` has balance: ${ balance } ` ) ;
340342 }
341343 }
342344}
You can’t perform that action at this time.
0 commit comments