fix: WaitTx and TransactionDetail use the network the transaction was sent on (closes #584)
WaitTx asked the active network's node for the receipt, so after a network switch a transaction sent on the other network was never found and was reported as timed out. It now asks the node of the network its chain id names, through reviewedNetworkProvider(), moved from ConfirmTx into the shared view helpers so both screens use one function. WaitTx and TransactionDetail build their explorer links for that network too. A stored wait or transaction whose chain id names no network is refused on restore, as a stored ConfirmTx transaction already is. Model: opus-5-5
This commit was merged in pull request #621.
This commit is contained in:
@@ -145,12 +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.
|
||||
function isRenderableTx(value) {
|
||||
return (
|
||||
isRecord(value) &&
|
||||
isAddressText(value.from) &&
|
||||
isAddressText(value.to) &&
|
||||
(!value.contractAddress || isAddressText(value.contractAddress))
|
||||
(!value.contractAddress || isAddressText(value.contractAddress)) &&
|
||||
(!value.chainId || SUPPORTED_CHAIN_IDS.has(value.chainId))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user