Skip to content

Commit

Permalink
fix antipattern
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Jun 12, 2023
1 parent 7886163 commit 50a8615
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/contracts/masa-contracts.ts
Expand Up @@ -117,13 +117,17 @@ export class MasaContracts extends MasaBase {
log.address.toLowerCase() === contract.address.toLowerCase()
)
.map((log: Log) => {
let result;

try {
return contract.interface.parseLog(log);
result = contract.interface.parseLog(log);
} catch (error) {
if (error instanceof Error) {
console.warn(error.message);
}
}

return result;
})
);
}
Expand Down

0 comments on commit 50a8615

Please sign in to comment.