diff --git a/app/serializers/udt_serializer.rb b/app/serializers/udt_serializer.rb index a8ae703e8..a359e63d2 100644 --- a/app/serializers/udt_serializer.rb +++ b/app/serializers/udt_serializer.rb @@ -38,7 +38,7 @@ class UdtSerializer object.omiga_inscription_info.expected_supply.to_s end - attribute :inscription_id, if: Proc.new { |record, _params| + attribute :inscription_info_id, if: Proc.new { |record, _params| record.udt_type == "omiga_inscription" } do |object| object.omiga_inscription_info.args diff --git a/test/controllers/api/v1/omiga_inscriptions_controller_test.rb b/test/controllers/api/v1/omiga_inscriptions_controller_test.rb index cd8dd5654..cc6d87b0b 100644 --- a/test/controllers/api/v1/omiga_inscriptions_controller_test.rb +++ b/test/controllers/api/v1/omiga_inscriptions_controller_test.rb @@ -46,7 +46,7 @@ class OmigaInscriptionsControllerTest < ActionDispatch::IntegrationTest assert_equal %w( symbol full_name display_name uan total_amount addresses_count decimal icon_file h24_ckb_transactions_count created_at description - published type_hash type_script issuer_address mint_status mint_limit expected_supply inscription_id + published type_hash type_script issuer_address mint_status mint_limit expected_supply inscription_info_id ).sort, response_udt["attributes"].keys.sort end