:last-child considers the most nested child to be "last", whereas lastChild returns the last highest-level child. The latter behavior is desired, otherwise safes with multiple safes as owners will have all the child safe owners attributed to the first child safe.
allAddresses.push(safe);
const newRoot = document.createElement('ul');
- root.querySelector('li:last-child').insertAdjacentElement('beforeend', newRoot);
+ root.lastChild.insertAdjacentElement('beforeend', newRoot);
for (const owner of owners) {
await insertTreeNode(newRoot, owner, rpc);
}