diff --git a/files/grest/rpc/governance/drep_info.sql b/files/grest/rpc/governance/drep_info.sql index d6166a99..fcac9336 100644 --- a/files/grest/rpc/governance/drep_info.sql +++ b/files/grest/rpc/governance/drep_info.sql @@ -98,9 +98,9 @@ BEGIN ENCODE(dh.raw, 'hex')::text AS hex, dh.has_script AS has_script, (CASE WHEN starts_with(dh.view,'drep_') OR (COALESCE(dr.deposit, 0) >= 0 AND dr.drep_hash_id IS NOT NULL) THEN TRUE ELSE FALSE END) AS registered, - (CASE WHEN (dr.deposit < 0) OR starts_with(dh.view,'drep_') THEN 0 ELSE COALESCE(ds.deposit, 0) END)::text AS deposit, + (CASE WHEN (dr.deposit < 0) OR starts_with(dh.view,'drep_') THEN NULL ELSE ds.deposit END)::text AS deposit, (CASE WHEN starts_with(dh.view,'drep_') THEN TRUE ELSE COALESCE(dr.deposit, 0) >= 0 AND ds.active END) AS active, - (CASE WHEN COALESCE(dr.deposit, 0) >= 0 THEN COALESCE(ds.expires_epoch_no, 0) ELSE 0 END) AS expires_epoch_no, + (CASE WHEN COALESCE(dr.deposit, 0) >= 0 THEN ds.expires_epoch_no ELSE NULL END) AS expires_epoch_no, COALESCE(dd.amount, 0)::text AS amount FROM public.drep_hash AS dh LEFT JOIN public.drep_registration AS dr ON dh.id = dr.drep_hash_id diff --git a/specs/results/koiosapi-guild.yaml b/specs/results/koiosapi-guild.yaml index 648fbbba..0314102f 100644 --- a/specs/results/koiosapi-guild.yaml +++ b/specs/results/koiosapi-guild.yaml @@ -4974,7 +4974,9 @@ components: description: Flag to show if the DRep is currently registered example: false deposit: - type: string + type: + - string + - null description: DRep's registration deposit in lovelace example: 500000000 active: @@ -4982,7 +4984,9 @@ components: description: Flag to show if the DRep is (i.e. not expired) example: true expires_epoch_no: - type: number + type: + - number + - null description: After which epoch DRep is considered inactive. example: 410 amount: diff --git a/specs/results/koiosapi-mainnet.yaml b/specs/results/koiosapi-mainnet.yaml index 3477c50d..49bf4682 100644 --- a/specs/results/koiosapi-mainnet.yaml +++ b/specs/results/koiosapi-mainnet.yaml @@ -4974,7 +4974,9 @@ components: description: Flag to show if the DRep is currently registered example: false deposit: - type: string + type: + - string + - null description: DRep's registration deposit in lovelace example: 500000000 active: @@ -4982,7 +4984,9 @@ components: description: Flag to show if the DRep is (i.e. not expired) example: true expires_epoch_no: - type: number + type: + - number + - null description: After which epoch DRep is considered inactive. example: 410 amount: diff --git a/specs/results/koiosapi-preprod.yaml b/specs/results/koiosapi-preprod.yaml index 821f1e11..f37492fa 100644 --- a/specs/results/koiosapi-preprod.yaml +++ b/specs/results/koiosapi-preprod.yaml @@ -4974,7 +4974,9 @@ components: description: Flag to show if the DRep is currently registered example: false deposit: - type: string + type: + - string + - null description: DRep's registration deposit in lovelace example: 500000000 active: @@ -4982,7 +4984,9 @@ components: description: Flag to show if the DRep is (i.e. not expired) example: true expires_epoch_no: - type: number + type: + - number + - null description: After which epoch DRep is considered inactive. example: 410 amount: diff --git a/specs/results/koiosapi-preview.yaml b/specs/results/koiosapi-preview.yaml index 9f9b6f2c..0ff2e7f8 100644 --- a/specs/results/koiosapi-preview.yaml +++ b/specs/results/koiosapi-preview.yaml @@ -4974,7 +4974,9 @@ components: description: Flag to show if the DRep is currently registered example: false deposit: - type: string + type: + - string + - null description: DRep's registration deposit in lovelace example: 500000000 active: @@ -4982,7 +4984,9 @@ components: description: Flag to show if the DRep is (i.e. not expired) example: true expires_epoch_no: - type: number + type: + - number + - null description: After which epoch DRep is considered inactive. example: 410 amount: diff --git a/specs/templates/4-api-schemas.yaml b/specs/templates/4-api-schemas.yaml index e3ea9235..97da16fa 100644 --- a/specs/templates/4-api-schemas.yaml +++ b/specs/templates/4-api-schemas.yaml @@ -2273,7 +2273,9 @@ schemas: description: Flag to show if the DRep is currently registered example: false deposit: - type: string + type: + - string + - null description: DRep's registration deposit in lovelace example: 500000000 active: @@ -2281,7 +2283,9 @@ schemas: description: Flag to show if the DRep is (i.e. not expired) example: true expires_epoch_no: - type: number + type: + - number + - null description: After which epoch DRep is considered inactive. example: 410 amount: