Skip to content

Commit

Permalink
Merge pull request #187 from blockfrost/1000101/2407/payment_cred
Browse files Browse the repository at this point in the history
fix(addresses): payment_cred stake_address: null
  • Loading branch information
vladimirvolek committed Jul 30, 2024
2 parents d579621 + bfa7287 commit 236eda5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `/addresses/{payment_cred}` and `/addresses/{payment_cred}/extended` to always show `stake_address: null`
- ordering in `/scripts`

## [2.0.3] - 2024-05-23
Expand Down
7 changes: 1 addition & 6 deletions src/sql/addresses/addresses_address.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
WITH queried_address AS (
SELECT CASE
WHEN $2::BYTEA IS NOT NULL THEN (
SELECT stake_address_id AS "stake_address_id"
FROM tx_out txo
WHERE txo.payment_cred = $2
LIMIT 1
)
WHEN $2::BYTEA IS NOT NULL THEN (0)
ELSE (
SELECT stake_address_id AS "stake_address_id"
FROM tx_out txo
Expand Down
7 changes: 1 addition & 6 deletions src/sql/addresses/addresses_address_extended.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
WITH queried_address AS (
SELECT CASE
WHEN $2::BYTEA IS NOT NULL THEN (
SELECT stake_address_id AS "stake_address_id"
FROM tx_out txo
WHERE txo.payment_cred = $2
LIMIT 1
)
WHEN $2::BYTEA IS NOT NULL THEN (0)
ELSE (
SELECT stake_address_id AS "stake_address_id"
FROM tx_out txo
Expand Down

0 comments on commit 236eda5

Please sign in to comment.