refactor miner name truncation

This commit is contained in:
Mononaut
2024-09-24 17:28:46 +00:00
parent 1f84e1722f
commit b29c4cf228
9 changed files with 53 additions and 86 deletions

View File

@@ -223,5 +223,5 @@ export function parseDATUMTemplateCreator(coinbaseRaw: string): string[] | null
let tagString = String.fromCharCode(...tags);
tagString = tagString.replace('\x00', '');
return tagString.split('\x0f');
return tagString.split('\x0f').map((name) => name.replace(/[^a-zA-Z0-9 ]/g, ''));
}