File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export function pushResultToHbWith ({
99 buildAndSign,
1010 logger,
1111 HB_GRAPHQL_URL ,
12+ ENABLE_PUSH ,
1213 fetch
1314} ) {
1415 const getCuAddress = getCuAddressWith ( { selectNode, logger } )
@@ -38,6 +39,9 @@ export function pushResultToHbWith ({
3839 . chain ( getCuAddress )
3940 . chain ( pullResult )
4041 . chain ( ( res ) => {
42+ if ( ! ENABLE_PUSH ) {
43+ return Rejected ( new Error ( 'Repush not enabled on this MU.' , { cause : ctx } ) )
44+ }
4145 const { msgs, number } = res
4246 if ( msgs . length <= number ) {
4347 return Rejected ( new Error ( 'Message number does not exist in the result.' , { cause : ctx } ) )
Original file line number Diff line number Diff line change @@ -418,6 +418,7 @@ export const createApis = async (ctx) => {
418418 buildAndSign : signerClient . buildAndSignWith ( { MU_WALLET , logger : pushResultToHbLogger } ) ,
419419 logger : pushResultToHbLogger ,
420420 HB_GRAPHQL_URL ,
421+ ENABLE_PUSH : ctx . ENABLE_PUSH ,
421422 fetch
422423 } )
423424
You can’t perform that action at this time.
0 commit comments