Skip to content

Commit

Permalink
namestate: check for expiration when returning JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
pinheadmz committed Feb 9, 2021
1 parent a94ce87 commit 1d744b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/covenants/namestate.js
Expand Up @@ -657,6 +657,7 @@ class NameState extends bio.Struct {
state = this.state(height, network);
state = statesByVal[state];
stats = this.toStats(height, network);
this.maybeExpire(height, network);
}

return {
Expand Down Expand Up @@ -819,7 +820,7 @@ class NameState extends bio.Struct {
}

// Add these details if name is in mid-transfer
if (this.transfer !== 0) {
if (this.transfer !== 0 && !this.maybeExpire(height, network)) {
const start = this.transfer;
const end = start + transferLockup;
const blocks = end - height;
Expand Down

0 comments on commit 1d744b1

Please sign in to comment.