Update REST API tokens query to correct for deleted token timestamps #13525
Annotations
5 errors
Execute Gradle:
hedera-mirror-rest/__tests__/testutils.js#L36
expect(received).toEqual(expected) // deep equality
Expected: "select e.auto_renew_account_id,e.auto_renew_period,t.created_timestamp,decimals,e.deleted,e.expiration_timestamp,fee_schedule_key,freeze_default,freeze_key,freeze_status,initial_supply,e.key,kyc_key,kyc_status,max_supply,e.memo,metadata,metadata_key,greatest(lower(t.timestamp_range),lower(e.timestamp_range)) as modified_timestamp,name,pause_key,pause_status,supply_key,supply_type,symbol,token_id,total_supply,treasury_account_id,t.type,wipe_key,(select jsonb_build_object('created_timestamp',lower(timestamp_range),'fixed_fees',fixed_fees,'fractional_fees',fractional_fees,'royalty_fees',royalty_fees,'token_id',entity_id) from custom_fee where entity_id = $1) as custom_fee from token t join entity e on e.id = t.token_id where token_id = $1"
Received: "select e.auto_renew_account_id,e.auto_renew_period,t.created_timestamp,decimals,e.deleted,e.expiration_timestamp,fee_schedule_key,freeze_default,freeze_key,freeze_status,initial_supply,e.key,kyc_key,kyc_status,max_supply,e.memo,metadata,metadata_key,greatest(lower(t.timestamp_range)::bigint,lower(e.timestamp_range)::bigint) as modified_timestamp,name,pause_key,pause_status,supply_key,supply_type,symbol,token_id,total_supply,treasury_account_id,t.type,wipe_key,(select jsonb_build_object('created_timestamp',lower(timestamp_range),'fixed_fees',fixed_fees,'fractional_fees',fractional_fees,'royalty_fees',royalty_fees,'token_id',entity_id) from custom_fee where entity_id = $1) as custom_fee from token t join entity e on e.id = t.token_id where token_id = $1"
at toEqual (__tests__/testutils.js:36:40)
at assertSqlQueryEqual (__tests__/tokens.test.js:1468:5)
at Object.verifyExtractSqlFromTokenInfoRequest (__tests__/tokens.test.js:1476:5)
|
Execute Gradle:
hedera-mirror-rest/__tests__/testutils.js#L36
expect(received).toEqual(expected) // deep equality
Expected: "select e.auto_renew_account_id,e.auto_renew_period,t.created_timestamp,decimals,e.deleted,e.expiration_timestamp,fee_schedule_key,freeze_default,freeze_key,freeze_status,initial_supply,e.key,kyc_key,kyc_status,max_supply,e.memo,metadata,metadata_key,greatest(lower(t.timestamp_range),lower(e.timestamp_range)) as modified_timestamp,name,pause_key,pause_status,supply_key,supply_type,symbol,token_id,total_supply,treasury_account_id,t.type,wipe_key,(select jsonb_build_object('created_timestamp',lower(timestamp_range),'fixed_fees',fixed_fees,'fractional_fees',fractional_fees,'royalty_fees',royalty_fees,'token_id',entity_id) from ((select *,lower(timestamp_range) as created_timestamp from custom_fee where entity_id = $1 and lower(timestamp_range) < $2) union all (select *,lower(timestamp_range) as created_timestamp from custom_fee_history where entity_id = $1 and lower(timestamp_range) < $2 order by lower(timestamp_range) desc limit 1) order by created_timestamp desc limit 1) as feeandhistory) as custom_fee from token t join entity e on e.id = t.token_id where token_id = $1"
Received: "select e.auto_renew_account_id,e.auto_renew_period,t.created_timestamp,decimals,e.deleted,e.expiration_timestamp,fee_schedule_key,freeze_default,freeze_key,freeze_status,initial_supply,e.key,kyc_key,kyc_status,max_supply,e.memo,metadata,metadata_key,greatest(lower(t.timestamp_range)::bigint,lower(e.timestamp_range)::bigint) as modified_timestamp,name,pause_key,pause_status,supply_key,supply_type,symbol,token_id,total_supply,treasury_account_id,t.type,wipe_key,(select jsonb_build_object('created_timestamp',lower(timestamp_range),'fixed_fees',fixed_fees,'fractional_fees',fractional_fees,'royalty_fees',royalty_fees,'token_id',entity_id) from ((select *,lower(timestamp_range) as created_timestamp from custom_fee where entity_id = $1 and lower(timestamp_range) < $2) union all (select *,lower(timestamp_range) as created_timestamp from custom_fee_history where entity_id = $1 and lower(timestamp_range) < $2 order by lower(timestamp_range) desc limit 1) order by created_timestamp desc limit 1) as feeandhistory) as custom_fee from token t join entity e on e.id = t.token_id where token_id = $1"
at toEqual (__tests__/testutils.js:36:40)
at assertSqlQueryEqual (__tests__/tokens.test.js:1468:5)
at Object.verifyExtractSqlFromTokenInfoRequest (__tests__/tokens.test.js:1491:7)
|
Execute Gradle:
hedera-mirror-rest/__tests__/testutils.js#L36
expect(received).toEqual(expected) // deep equality
Expected: "select e.auto_renew_account_id,e.auto_renew_period,t.created_timestamp,decimals,e.deleted,e.expiration_timestamp,fee_schedule_key,freeze_default,freeze_key,freeze_status,initial_supply,e.key,kyc_key,kyc_status,max_supply,e.memo,metadata,metadata_key,greatest(lower(t.timestamp_range),lower(e.timestamp_range)) as modified_timestamp,name,pause_key,pause_status,supply_key,supply_type,symbol,token_id,total_supply,treasury_account_id,t.type,wipe_key,(select jsonb_build_object('created_timestamp',lower(timestamp_range),'fixed_fees',fixed_fees,'fractional_fees',fractional_fees,'royalty_fees',royalty_fees,'token_id',entity_id) from ((select *,lower(timestamp_range) as created_timestamp from custom_fee where entity_id = $1 and lower(timestamp_range) <= $2) union all (select *,lower(timestamp_range) as created_timestamp from custom_fee_history where entity_id = $1 and lower(timestamp_range) <= $2 order by lower(timestamp_range) desc limit 1) order by created_timestamp desc limit 1) as feeandhistory) as custom_fee from token t join entity e on e.id = t.token_id where token_id = $1"
Received: "select e.auto_renew_account_id,e.auto_renew_period,t.created_timestamp,decimals,e.deleted,e.expiration_timestamp,fee_schedule_key,freeze_default,freeze_key,freeze_status,initial_supply,e.key,kyc_key,kyc_status,max_supply,e.memo,metadata,metadata_key,greatest(lower(t.timestamp_range)::bigint,lower(e.timestamp_range)::bigint) as modified_timestamp,name,pause_key,pause_status,supply_key,supply_type,symbol,token_id,total_supply,treasury_account_id,t.type,wipe_key,(select jsonb_build_object('created_timestamp',lower(timestamp_range),'fixed_fees',fixed_fees,'fractional_fees',fractional_fees,'royalty_fees',royalty_fees,'token_id',entity_id) from ((select *,lower(timestamp_range) as created_timestamp from custom_fee where entity_id = $1 and lower(timestamp_range) <= $2) union all (select *,lower(timestamp_range) as created_timestamp from custom_fee_history where entity_id = $1 and lower(timestamp_range) <= $2 order by lower(timestamp_range) desc limit 1) order by created_timestamp desc limit 1) as feeandhistory) as custom_fee from token t join entity e on e.id = t.token_id where token_id = $1"
at toEqual (__tests__/testutils.js:36:40)
at assertSqlQueryEqual (__tests__/tokens.test.js:1468:5)
at Object.verifyExtractSqlFromTokenInfoRequest (__tests__/tokens.test.js:1491:7)
|
Execute Gradle:
hedera-mirror-rest/__tests__/testutils.js#L36
expect(received).toEqual(expected) // deep equality
Expected: "select e.auto_renew_account_id,e.auto_renew_period,t.created_timestamp,decimals,e.deleted,e.expiration_timestamp,fee_schedule_key,freeze_default,freeze_key,freeze_status,initial_supply,e.key,kyc_key,kyc_status,max_supply,e.memo,metadata,metadata_key,greatest(lower(t.timestamp_range),lower(e.timestamp_range)) as modified_timestamp,name,pause_key,pause_status,supply_key,supply_type,symbol,token_id,total_supply,treasury_account_id,t.type,wipe_key,(select jsonb_build_object('created_timestamp',lower(timestamp_range),'fixed_fees',fixed_fees,'fractional_fees',fractional_fees,'royalty_fees',royalty_fees,'token_id',entity_id) from ((select *,lower(timestamp_range) as created_timestamp from custom_fee where entity_id = $1 and lower(timestamp_range) <= $2) union all (select *,lower(timestamp_range) as created_timestamp from custom_fee_history where entity_id = $1 and lower(timestamp_range) <= $2 order by lower(timestamp_range) desc limit 1) order by created_timestamp desc limit 1) as feeandhistory) as custom_fee from token t join entity e on e.id = t.token_id where token_id = $1"
Received: "select e.auto_renew_account_id,e.auto_renew_period,t.created_timestamp,decimals,e.deleted,e.expiration_timestamp,fee_schedule_key,freeze_default,freeze_key,freeze_status,initial_supply,e.key,kyc_key,kyc_status,max_supply,e.memo,metadata,metadata_key,greatest(lower(t.timestamp_range)::bigint,lower(e.timestamp_range)::bigint) as modified_timestamp,name,pause_key,pause_status,supply_key,supply_type,symbol,token_id,total_supply,treasury_account_id,t.type,wipe_key,(select jsonb_build_object('created_timestamp',lower(timestamp_range),'fixed_fees',fixed_fees,'fractional_fees',fractional_fees,'royalty_fees',royalty_fees,'token_id',entity_id) from ((select *,lower(timestamp_range) as created_timestamp from custom_fee where entity_id = $1 and lower(timestamp_range) <= $2) union all (select *,lower(timestamp_range) as created_timestamp from custom_fee_history where entity_id = $1 and lower(timestamp_range) <= $2 order by lower(timestamp_range) desc limit 1) order by created_timestamp desc limit 1) as feeandhistory) as custom_fee from token t join entity e on e.id = t.token_id where token_id = $1"
at toEqual (__tests__/testutils.js:36:40)
at assertSqlQueryEqual (__tests__/tokens.test.js:1468:5)
at Object.verifyExtractSqlFromTokenInfoRequest (__tests__/tokens.test.js:1512:5)
|
Execute Gradle
Process completed with exit code 1.
|
Loading