Skip to content

Commit

Permalink
fix: handle deployed_type_script with matching code_hash (#1512)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitz authored Nov 23, 2023
1 parent 26aaf01 commit 18c936b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/v2/scripts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_script_content
deployed_cells = @contract.deployed_cell_outputs
if deployed_cells.present?
deployed_type_script = deployed_cells[0].type_script
if deployed_type_script.code_hash == Settings.type_id_code_hash
if deployed_type_script && deployed_type_script.code_hash == Settings.type_id_code_hash
type_id = deployed_type_script.script_hash
end
end
Expand Down

0 comments on commit 18c936b

Please sign in to comment.