bob-wallet icon indicating copy to clipboard operation
bob-wallet copied to clipboard

Cards: claim domain reward

Open Falci opened this issue 3 years ago • 1 comments

Expected Behavior

Bob could tell me I have a claimed domain to be registered and this claim comes with a reward.

Current Behavior

image

Steps to Reproduce

  1. Claim a domain
  2. Wait 30 days
  3. Go to Bob's Portfolio

Falci avatar Feb 03 '22 09:02 Falci

https://github.com/kyokan/bob-wallet/blob/ee43daaa3aaabc268a9284cc77af637204052f7d/app/background/wallet/stats.js#L177-L189

I think there's a few things wrong with this actually.

First, CLAIM lockup isn't network.coinbaseMaturity, it's network.names.lockupPeriod (but I think this gets caught by the CLOSED check anyway, before 30 days a claimed name is LOCKED)

And then yeah the reward for claimed names obviously is not the difference between highest and second highest bid (like it is for aucitoned names). All reserved names have a value of 0 (and a "highest" of 0). The value in the card should be (I think) the value of the CLAIM output value. This entire value gets returned to the wallet as change (minus fee) when the user REGISTERs.

pinheadmz avatar Feb 03 '22 13:02 pinheadmz