File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -308,11 +308,13 @@ export async function handleLegacyBridgeSwap(msg: CosmosMessage<LegacyBridgeSwap
308308 logger . info ( `[handleLegacyBridgeSwap] (tx ${ msg . tx . hash } ): indexing LegacyBridgeSwap ${ id } ` )
309309 logger . debug ( `[handleLegacyBridgeSwap] (msg.msg): ${ JSON . stringify ( msg . msg , null , 2 ) } ` )
310310
311- const {
312- msg : { swap : { destination} } ,
313- funds : [ { amount, denom} ] ,
314- contract,
315- } = msg . msg . decodedMsg ;
311+ const contract = msg . msg . decodedMsg . contract ;
312+ const swapMsg = msg . msg . decodedMsg . msg ;
313+ const destination = swapMsg ?. swap ?. destination ;
314+
315+ const funds = msg . msg . decodedMsg . funds || [ ] ;
316+ const amount = funds [ 0 ] ?. amount ;
317+ const denom = funds [ 0 ] ?. denom ;
316318
317319 // gracefully skip indexing "swap" messages that doesn't fullfill the bridge contract
318320 // otherwise, the node will just crashloop trying to save the message to the db with required null fields.
You can’t perform that action at this time.
0 commit comments