-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 Handle NFT holders in case of
nft.controller_transfer
In case of `ControllerTransfer` as the reason for `NFTPortfolioUpdate` event, asset transaction entry was being made but NFTHolder set of nft_ids was not getting updated. This handles the logic to update the NFTHolders
- Loading branch information
1 parent
3dc0dd4
commit 1d738d1
Showing
4 changed files
with
55 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- for older blocks, the extrinsic_idx in asset_transactions was not being populated. We use the events table to update the value for `Issued` event | ||
update | ||
asset_transactions ast | ||
set | ||
extrinsic_idx = e.extrinsic_idx | ||
from | ||
events e | ||
where | ||
e.block_id = ast.created_block_id | ||
and e.event_idx = ast.event_idx | ||
and ast.extrinsic_idx is null | ||
and e.extrinsic_idx is not null; | ||
|
||
-- extrinsic_id mapping in events was not being populated correctly. We use the block_id and extrinsic_idx to update the missing values | ||
update | ||
events | ||
set | ||
extrinsic_id = block_id || '/' || extrinsic_idx | ||
where | ||
extrinsic_id is null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters