launchpad: Widen allowed eventType in logs.findAttribute

This commit is contained in:
willclarktech 2021-02-10 17:36:02 +00:00
parent 91b886c476
commit 7577698a1c
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7

View File

@ -68,11 +68,7 @@ export function parseLogs(input: unknown): readonly Log[] {
*
* Throws if the attribute was not found.
*/
export function findAttribute(
logs: readonly Log[],
eventType: "message" | "transfer",
attrKey: string,
): Attribute {
export function findAttribute(logs: readonly Log[], eventType: string, attrKey: string): Attribute {
const firstLogs = logs.find(() => true);
const out = firstLogs?.events
.find((event) => event.type === eventType)