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:
@@ -459,6 +459,19 @@ const CONTRACT = [
|
||||
views: ["transaction"],
|
||||
restored: false,
|
||||
},
|
||||
// A chain id naming no network has no explorer to link to.
|
||||
{
|
||||
value: {
|
||||
tx: {
|
||||
hash: "0x1",
|
||||
from: ADDRESS,
|
||||
to: ADDRESS,
|
||||
chainId: "0x5",
|
||||
},
|
||||
},
|
||||
views: ["transaction"],
|
||||
restored: false,
|
||||
},
|
||||
// confirm-tx passes on `data.pendingTx`.
|
||||
{
|
||||
value: { pendingTx: { amount: "1" } },
|
||||
@@ -821,7 +834,7 @@ const WELL_FORMED_DATA = {
|
||||
},
|
||||
pendingWait: {
|
||||
hash: "0x1",
|
||||
txInfo: { to: ADDRESS, amount: "1" },
|
||||
txInfo: { to: ADDRESS, amount: "1", chainId: "0x1" },
|
||||
broadcastTime: BROADCAST_TIME,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user