fix: TransactionDetail reads a transaction from the Blockscout of the network it was sent on (closes #623)
TransactionDetail read the block, network details and calldata from the active network's Blockscout and decoded the calldata for the active network, so after a network switch a transaction sent on the other network showed none of them. It now reads them from the Blockscout Settings has for the network the transaction was sent on, and decodes the calldata for that network. endpointsByChainId() in the shared view helpers gives a network's RPC and Blockscout URLs, picked as reviewedNetworkProvider() picked its node; reviewedNetworkProvider() now uses it. Restore refuses a stored transaction whose chain id names no network, as it does for WaitTx. Model: opus-5-5
This commit was merged in pull request #627.
This commit is contained in:
@@ -145,15 +145,15 @@ function isRenderablePendingTx(value) {
|
||||
|
||||
// The stored transaction transactionDetail.render() shows. contractAddress is
|
||||
// optional on an ETH transfer, and reaches addressDotHtml() when it is there.
|
||||
// `chainId` picks the network whose explorer the links open, so when it is
|
||||
// there it has to name one.
|
||||
// `chainId` picks the network whose explorer the links open and whose
|
||||
// Blockscout the transaction is read from, so it has to name one.
|
||||
function isRenderableTx(value) {
|
||||
return (
|
||||
isRecord(value) &&
|
||||
isAddressText(value.from) &&
|
||||
isAddressText(value.to) &&
|
||||
(!value.contractAddress || isAddressText(value.contractAddress)) &&
|
||||
(!value.chainId || SUPPORTED_CHAIN_IDS.has(value.chainId))
|
||||
SUPPORTED_CHAIN_IDS.has(value.chainId)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user