stacks-blockchain-api icon indicating copy to clipboard operation
stacks-blockchain-api copied to clipboard

feat: improve insert nft custody

Open bestmike007 opened this issue 1 year ago • 3 comments

Description

This PR is to prevent upsert the same row in table nft_custody during updateNftEvents

Type of Change

  • [ ] New feature
  • [ ] Bug fix
  • [ ] API reference/documentation update
  • [x] Other

Does this introduce a breaking change?

No.

Are documentation updates required?

No.

Testing information

No, all covered.

Checklist

  • [x] Code is commented where needed
  • [x] Unit test coverage for new or modified code paths
  • [x] npm run test passes
  • [ ] Changelog is updated
  • [x] Tag 1 of @rafaelcr or @zone117x for review

bestmike007 avatar Mar 06 '24 09:03 bestmike007

@rafaelcr @zone117x

bestmike007 avatar Mar 06 '24 09:03 bestmike007

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.86%. Comparing base (7921488) to head (e785a6c). Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1880      +/-   ##
==========================================
- Coverage   71.86%   71.86%   -0.01%     
==========================================
  Files          92       92              
  Lines       11911    11914       +3     
  Branches     2624     2624              
==========================================
+ Hits         8560     8562       +2     
- Misses       3197     3198       +1     
  Partials      154      154              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 06 '24 09:03 codecov[bot]

Did the error you reported on the other PR go away after this change @bestmike007 ? At first glance, it looks like this change wouldn't do much because we already remove duplicate rows per each batch run, however I'm curious to see if this made any change for you. Perhaps there's something else we're missing here.

rafaelcr avatar Mar 06 '24 14:03 rafaelcr