@@ -128,7 +128,11 @@ async fn pool_status(oracle_pool: Arc<OraclePool>) -> Result<Json<serde_json::Va
128128}
129129
130130fn pool_status_sync ( oracle_pool : Arc < OraclePool > ) -> Result < Json < serde_json:: Value > , ApiError > {
131- let node_api = NodeApi :: new ( ORACLE_SECRETS . node_api_key . clone ( ) , & ORACLE_CONFIG . node_url ) ;
131+ let node_api = NodeApi :: new (
132+ ORACLE_SECRETS . node_api_key . clone ( ) ,
133+ ORACLE_SECRETS . wallet_password . clone ( ) ,
134+ & ORACLE_CONFIG . node_url ,
135+ ) ;
132136 let current_height = node_api. node . current_block_height ( ) ? as u32 ;
133137 let pool_box = oracle_pool. get_pool_box_source ( ) . get_pool_box ( ) ?;
134138 let epoch_length = POOL_CONFIG
@@ -156,7 +160,11 @@ fn pool_status_sync(oracle_pool: Arc<OraclePool>) -> Result<Json<serde_json::Val
156160/// Block height of the Ergo blockchain
157161async fn block_height ( ) -> Result < impl IntoResponse , ApiError > {
158162 let current_height = task:: spawn_blocking ( move || {
159- let node_api = NodeApi :: new ( ORACLE_SECRETS . node_api_key . clone ( ) , & ORACLE_CONFIG . node_url ) ;
163+ let node_api = NodeApi :: new (
164+ ORACLE_SECRETS . node_api_key . clone ( ) ,
165+ ORACLE_SECRETS . wallet_password . clone ( ) ,
166+ & ORACLE_CONFIG . node_url ,
167+ ) ;
160168 node_api. node . current_block_height ( )
161169 } )
162170 . await
@@ -197,7 +205,11 @@ async fn oracle_health(oracle_pool: Arc<OraclePool>) -> impl IntoResponse {
197205}
198206
199207fn oracle_health_sync ( oracle_pool : Arc < OraclePool > ) -> Result < OracleHealth , ApiError > {
200- let node_api = NodeApi :: new ( ORACLE_SECRETS . node_api_key . clone ( ) , & ORACLE_CONFIG . node_url ) ;
208+ let node_api = NodeApi :: new (
209+ ORACLE_SECRETS . node_api_key . clone ( ) ,
210+ ORACLE_SECRETS . wallet_password . clone ( ) ,
211+ & ORACLE_CONFIG . node_url ,
212+ ) ;
201213 let current_height = ( node_api. node . current_block_height ( ) ? as u32 ) . into ( ) ;
202214 let epoch_length = POOL_CONFIG
203215 . refresh_box_wrapper_inputs
@@ -239,7 +251,11 @@ async fn pool_health(oracle_pool: Arc<OraclePool>) -> impl IntoResponse {
239251}
240252
241253fn pool_health_sync ( oracle_pool : Arc < OraclePool > ) -> Result < PoolHealth , ApiError > {
242- let node_api = NodeApi :: new ( ORACLE_SECRETS . node_api_key . clone ( ) , & ORACLE_CONFIG . node_url ) ;
254+ let node_api = NodeApi :: new (
255+ ORACLE_SECRETS . node_api_key . clone ( ) ,
256+ ORACLE_SECRETS . wallet_password . clone ( ) ,
257+ & ORACLE_CONFIG . node_url ,
258+ ) ;
243259 let current_height = ( node_api. node . current_block_height ( ) ? as u32 ) . into ( ) ;
244260 let pool_box = & oracle_pool. get_pool_box_source ( ) . get_pool_box ( ) ?;
245261 let pool_box_height = pool_box. get_box ( ) . creation_height . into ( ) ;
0 commit comments