Skip to content

Commit

Permalink
add existence check for trace.action address and refundAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
haseebrabbani committed Dec 11, 2023
1 parent b37008a commit 6445fa5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cli/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,12 @@ export const createTransactionEvent: CreateTransactionEvent = (

const trcs: Trace[] = []
traces.forEach(trace => {
addresses[formatAddress(trace.action.address)] = true
addresses[formatAddress(trace.action.refundAddress)] = true
if (trace.action.address) {
addresses[formatAddress(trace.action.address)] = true
}
if (trace.action.refundAddress) {
addresses[formatAddress(trace.action.refundAddress)] = true
}
addresses[formatAddress(trace.action.to)] = true
addresses[formatAddress(trace.action.from)] = true

Expand Down

0 comments on commit 6445fa5

Please sign in to comment.