Fix withdrawal tx list when token is not supported (#33)

This commit is contained in:
Luis Camargo
2023-10-02 19:35:11 -06:00
committed by GitHub
parent 79c2afb57a
commit f32fa6215d

View File

@@ -52,12 +52,12 @@ export function explorerTxToBridgeWithdrawal(tx: BlockExplorerTransaction): Brid
type: 'Withdrawal',
from: tx.from,
to: tx.to,
assetSymbol: token.L2symbol ?? '',
assetSymbol: token?.L2symbol ?? 'Unlisted',
amount: (
(functionName === 'withdraw' ? decodedWithdrawData[1] : decodedWithdrawData[2]) as BigNumber
).toString(),
blockTimestamp: tx.timeStamp,
hash: tx.hash as `0x${string}`,
priceApiId: token.apiId,
priceApiId: token?.apiId,
};
}
}