Skip to content

Commit

Permalink
fix: update with case from/to null both and parse from .messages[0]
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Nam Dao committed Feb 17, 2023
1 parent 6e49c72 commit 6460d79
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions views/transactions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ const _getFromAndToEvmFromCosmosMsg = (res: EvmTransactionDetailResponse): [stri

let from = ''
let to = ''
if (isEmpty(result)) {
if (!isEmpty(result) && (!isEmpty(result.from) || !isEmpty(result.to))) {
// parsed from body data
from = result.from
to = result.to
} else {
// parse from first message body data
const message = messages?.[0]
try {
Expand All @@ -277,10 +281,6 @@ const _getFromAndToEvmFromCosmosMsg = (res: EvmTransactionDetailResponse): [stri
} catch (e) {
Sentry.captureException(e)
}
} else {
// parsed from body data
from = result.from
to = result.to
}

return [from, to]
Expand Down

0 comments on commit 6460d79

Please sign in to comment.