Skip to content

Commit

Permalink
fix: Add null check for pretty value (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
karanpargal authored Jul 10, 2024
1 parent ce54e36 commit afad243
Show file tree
Hide file tree
Showing 2 changed files with 309 additions and 285 deletions.
5 changes: 4 additions & 1 deletion services/decoder/native/native.decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { currencyToNumber } from "../../../utils/functions";
import { DECODED_ACTION, DECODED_EVENT_CATEGORY } from "../decoder.constants";

GoldRushDecoder.native((tx, options): EventType | null => {
if (currencyToNumber(tx.pretty_value_quote) < options.min_usd!) {
if (
tx.pretty_value_quote &&
currencyToNumber(tx.pretty_value_quote) < options.min_usd!
) {
return null;
}

Expand Down
Loading

0 comments on commit afad243

Please sign in to comment.