File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed
packages/background/src/updater Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -67,19 +67,17 @@ export class ChainUpdaterService {
6767 baseURL : chainInfo . rpc ,
6868 } ) ;
6969
70- // Get the latest block .
70+ // Get the status to get the chain id .
7171 const result = await instance . get < {
7272 result : {
73- block : {
74- header : {
75- chain_id : string ;
76- } ;
73+ node_info : {
74+ network : "osmosis-1" ;
7775 } ;
7876 } ;
79- } > ( "/block " ) ;
77+ } > ( "/status " ) ;
8078
8179 const currentVersion = ChainIdHelper . parse ( chainInfo . chainId ) ;
82- const fetchedChainId = result . data . result . block . header . chain_id ;
80+ const fetchedChainId = result . data . result . node_info . network ;
8381 const fetchedVersion = ChainIdHelper . parse ( fetchedChainId ) ;
8482
8583 if (
@@ -207,18 +205,16 @@ export class ChainUpdaterService {
207205 baseURL : chainInfo . rpc ,
208206 } ) ;
209207
210- // Get the latest block .
208+ // Get the status to get the chain id .
211209 const result = await instance . get < {
212210 result : {
213- block : {
214- header : {
215- chain_id : string ;
216- } ;
211+ node_info : {
212+ network : "osmosis-1" ;
217213 } ;
218214 } ;
219- } > ( "/block " ) ;
215+ } > ( "/status " ) ;
220216
221- const resultChainId = result . data . result . block . header . chain_id ;
217+ const resultChainId = result . data . result . node_info . network ;
222218
223219 const version = ChainIdHelper . parse ( chainId ) ;
224220 const fetchedVersion = ChainIdHelper . parse ( resultChainId ) ;
You can’t perform that action at this time.
0 commit comments