Add address-token detail view for per-token transaction filtering
All checks were successful
check / check (push) Successful in 17s
All checks were successful
check / check (push) Successful in 17s
Clicking a token balance on the address detail view navigates to a focused view showing only that token's transactions. Send pre-selects and locks the token dropdown, Receive shows an ERC-20 warning for non-ETH tokens, and all back buttons return to the correct parent view.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
const { $, showFlash, formatAddressHtml } = require("./helpers");
|
||||
const { state, currentAddress } = require("../../shared/state");
|
||||
let ctx;
|
||||
const { getProvider } = require("../../shared/balances");
|
||||
const { KNOWN_SYMBOLS } = require("../../shared/tokens");
|
||||
|
||||
@@ -53,7 +54,8 @@ function updateSendBalance() {
|
||||
}
|
||||
}
|
||||
|
||||
function init(ctx) {
|
||||
function init(_ctx) {
|
||||
ctx = _ctx;
|
||||
$("send-token").addEventListener("change", updateSendBalance);
|
||||
|
||||
$("btn-send-review").addEventListener("click", async () => {
|
||||
@@ -100,7 +102,14 @@ function init(ctx) {
|
||||
});
|
||||
});
|
||||
|
||||
$("btn-send-back").addEventListener("click", ctx.showAddressDetail);
|
||||
$("btn-send-back").addEventListener("click", () => {
|
||||
$("send-token").disabled = false;
|
||||
if (state.selectedToken) {
|
||||
ctx.showAddressToken();
|
||||
} else {
|
||||
ctx.showAddressDetail();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = { init, updateSendBalance, renderSendTokenSelect };
|
||||
|
||||
Reference in New Issue
Block a user