Skip to content

Commit

Permalink
fix nil pointer address
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberphysic4l committed Mar 28, 2024
1 parent 17c1b8d commit e132677
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/testsuite/mock/wallet_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1209,15 +1209,19 @@ func (w *Wallet) registerOutputs(transactionName string, transaction *iotago.Tra
}
}
// register the output by both name and ID
var address iotago.Address
if addressUC != nil {
address = addressUC.Address
}
w.outputs[fmt.Sprintf("%s:%d", transactionName, outputID.Index())] = &OutputData{
ID: actualOutputID,
Output: clonedOutput,
Address: addressUC.Address,
Address: address,
}
w.outputsByID[actualOutputID] = &OutputData{
ID: actualOutputID,
Output: clonedOutput,
Address: addressUC.Address,
Address: address,
}

break
Expand Down

0 comments on commit e132677

Please sign in to comment.