sirius-x: the dashboard knows covenant-held names, and can register with a commit first
Covenant-held names now list under their owner with an expiry badge, warn from sixty days out, and get an Expiry tab: move an ordinary name into the covenant (one payment, no way back - the page says so), or renew. Records, transfer and release go through the covenant for such a name; a listing cannot, and the Sell tab says why. A name just sent into the covenant is remembered until its block, so it does not vanish from the list meanwhile. Registering offers "Commit first": a hash goes out now and the name a block later, so it cannot be copied out of the mempool. The pending commit is stored before it is broadcast, the open tab reveals by itself once the commit is mined, and the dashboard lists registrations in progress and can finish one the tab did not live to complete. Also: a one-cent name's platform share of the fee was below the dust limit, which made the registration unmineable; a dust-sized share now goes with the other one.
This commit is contained in:
parent
a9f4bfa95a
commit
559eb6996a
1 changed files with 11 additions and 2 deletions
|
|
@ -70,8 +70,17 @@ export async function findTldOwnerAddress(client, tld, prefix = REGISTRAR.addres
|
|||
*/
|
||||
export function splitServiceFee(serviceFeeSats) {
|
||||
const total = BigInt(serviceFeeSats ?? 0n);
|
||||
const tldOwner = (total * TLD_OWNER_SHARE_NUM) / TLD_OWNER_SHARE_DEN;
|
||||
const platform = total - tldOwner;
|
||||
let tldOwner = (total * TLD_OWNER_SHARE_NUM) / TLD_OWNER_SHARE_DEN;
|
||||
let platform = total - tldOwner;
|
||||
// An output below the dust limit is rejected by the network, so a cheap
|
||||
// name's split would make its registration unmineable. The small share
|
||||
// then goes with the big one: the TLD owner keeps all of a fee whose
|
||||
// platform share is dust, and the platform keeps all of a fee that is
|
||||
// too small to split at all.
|
||||
const DUST = 546n;
|
||||
if (platform > 0n && platform < DUST) { tldOwner = total; platform = 0n; }
|
||||
if (tldOwner > 0n && tldOwner < DUST) { platform = total; tldOwner = 0n; }
|
||||
if (platform < DUST) platform = 0n; // a fee below the dust limit cannot be paid at all
|
||||
return { tldOwnerFeeSats: tldOwner, platformFeeSats: platform };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue