File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ export const padUint16 = (s: string): string => s.padStart(MAX_UINT_16.length, '
14
14
const MAX_UINT_64 = '18446744073709551615' ;
15
15
export const padUint64 = ( s : string ) : string => s . padStart ( MAX_UINT_64 . length , '0' ) ;
16
16
17
- export const WormholescanRPC : string = 'https://api.wormholescan.io/' ;
17
+ export const WormholescanRPC : { [ key in Network ] ?: string } = {
18
+ [ 'Mainnet' ] : 'https://api.wormholescan.io/' ,
19
+ [ 'Testnet' ] : 'https://api.testnet.wormholescan.io/' ,
20
+ [ 'Devnet' ] : '' ,
21
+ } ;
18
22
19
23
export function parseMessageId ( id : string ) : {
20
24
chain : number ;
@@ -89,7 +93,7 @@ export async function formatAndSendToSlack(info: SlackInfo): Promise<any> {
89
93
90
94
export async function isVAASigned ( network : Network , vaaKey : string ) : Promise < boolean > {
91
95
const url : string =
92
- WormholescanRPC + 'v1/signed_vaa/' + vaaKey + '?network=' + network . toUpperCase ( ) ;
96
+ WormholescanRPC [ network ] + 'v1/signed_vaa/' + vaaKey + '?network=' + network . toUpperCase ( ) ;
93
97
try {
94
98
const response = await axios . get ( url ) ;
95
99
// curl -X 'GET' \
You can’t perform that action at this time.
0 commit comments