fix: say a contract creation has no recipient instead of a blank line (closes #250)
A transaction with no `to` showed a blank recipient line on the wait, success and error screens and the transaction detail view: an empty address, with a colour dot whose colour was `undefined`. The approval screen showed "(contract creation)". All five now say "This transaction creates a new contract. It has no recipient." A transaction with a real `to` is unchanged. The new test drives each screen both ways. Model: opus-5-5
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const {
|
||||
$,
|
||||
addressTitle,
|
||||
CONTRACT_CREATION_TEXT,
|
||||
escapeHtml,
|
||||
showView,
|
||||
showError,
|
||||
@@ -320,7 +321,7 @@ function showTxApproval(details) {
|
||||
toHtml += approvalAddressHtml(toAddr);
|
||||
$("approve-tx-to").innerHTML = toHtml;
|
||||
} else {
|
||||
$("approve-tx-to").innerHTML = escapeHtml("(contract creation)");
|
||||
$("approve-tx-to").innerHTML = escapeHtml(CONTRACT_CREATION_TEXT);
|
||||
}
|
||||
|
||||
const ethValueFormatted = formatTxValue(
|
||||
|
||||
Reference in New Issue
Block a user