File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,9 @@ const MAX_VAAS_TO_REOBSERVE = 25;
14
14
export async function convertSolanaTxToAccts ( txHash : string ) : Promise < string [ ] > {
15
15
const POST_MESSAGE_IX_ID = 0x01 ;
16
16
let accounts : string [ ] = [ ] ;
17
+ const network = getNetwork ( ) ;
17
18
const endpoint : string =
18
- getNetwork ( ) === 'Mainnet'
19
- ? 'https://api.mainnet-beta.solana.com'
20
- : 'https://api.devnet.solana.com' ;
19
+ network === 'Mainnet' ? 'https://api.mainnet-beta.solana.com' : 'https://api.devnet.solana.com' ;
21
20
const connection = new Connection ( endpoint , 'finalized' ) ;
22
21
const txs = await connection . getTransactions ( [ txHash ] , {
23
22
maxSupportedTransactionVersion : 0 ,
@@ -29,7 +28,7 @@ export async function convertSolanaTxToAccts(txHash: string): Promise<string[]>
29
28
const message = tx . transaction . message ;
30
29
const accountKeys = isLegacyMessage ( message ) ? message . accountKeys : message . staticAccountKeys ;
31
30
const programIdIndex = accountKeys . findIndex (
32
- ( i ) => i . toBase58 ( ) === contracts . coreBridge ( 'Mainnet' , 'Solana' )
31
+ ( i ) => i . toBase58 ( ) === contracts . coreBridge ( network , 'Solana' )
33
32
) ;
34
33
const instructions = message . compiledInstructions ;
35
34
const innerInstructions =
You can’t perform that action at this time.
0 commit comments