mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-30 22:09:00 -07:00
25 lines
704 B
JavaScript
25 lines
704 B
JavaScript
import { redaction } from "../../redaction/index.js";
|
|
import { createTransactionRow } from "./row.js";
|
|
|
|
/**
|
|
* @typedef {import("./transaction.js").WalletTransaction} WalletTransaction
|
|
*/
|
|
|
|
/**
|
|
* @param {string} date
|
|
* @param {readonly WalletTransaction[]} transactions
|
|
*/
|
|
export function createTransactionSection(date, transactions) {
|
|
const section = document.createElement("section");
|
|
const heading = document.createElement("h3");
|
|
const list = document.createElement("ol");
|
|
|
|
heading.append(redaction.createValue("span", date, "fixed"));
|
|
for (const transaction of transactions) {
|
|
list.append(createTransactionRow(transaction));
|
|
}
|
|
section.append(heading, list);
|
|
|
|
return section;
|
|
}
|