Show sending address on send page with color dot and ENS name
Some checks failed
check / check (push) Has been cancelled
Some checks failed
check / check (push) Has been cancelled
This commit is contained in:
@@ -277,6 +277,10 @@
|
|||||||
< Back
|
< Back
|
||||||
</button>
|
</button>
|
||||||
<h2 class="font-bold mb-2">Send</h2>
|
<h2 class="font-bold mb-2">Send</h2>
|
||||||
|
<div class="mb-2">
|
||||||
|
<label class="block mb-1 text-xs text-muted">From</label>
|
||||||
|
<div id="send-from" class="text-xs mb-1"></div>
|
||||||
|
</div>
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
<label class="block mb-1">What to send</label>
|
<label class="block mb-1">What to send</label>
|
||||||
<select
|
<select
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
// Send view: collect To, Amount, Token. Then go to confirmation.
|
// Send view: collect To, Amount, Token. Then go to confirmation.
|
||||||
|
|
||||||
const { $, showFlash } = require("./helpers");
|
const { $, showFlash, formatAddressHtml } = require("./helpers");
|
||||||
const { state, currentAddress } = require("../../shared/state");
|
const { state, currentAddress } = require("../../shared/state");
|
||||||
const { getProvider } = require("../../shared/balances");
|
const { getProvider } = require("../../shared/balances");
|
||||||
|
|
||||||
function updateSendBalance() {
|
function updateSendBalance() {
|
||||||
const addr = currentAddress();
|
const addr = currentAddress();
|
||||||
if (!addr) return;
|
if (!addr) return;
|
||||||
|
$("send-from").innerHTML = formatAddressHtml(
|
||||||
|
addr.address,
|
||||||
|
addr.ensName || null,
|
||||||
|
null,
|
||||||
|
);
|
||||||
const token = $("send-token").value;
|
const token = $("send-token").value;
|
||||||
if (token === "ETH") {
|
if (token === "ETH") {
|
||||||
$("send-balance").textContent =
|
$("send-balance").textContent =
|
||||||
|
|||||||
Reference in New Issue
Block a user