mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Merge pull request #665 from cosmos/662-logs-find-attribute
Allow any string eventType in logs.findAttribute
This commit is contained in:
commit
780ef3e47b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user