Environment variables
This commit is contained in:
@@ -45,6 +45,9 @@ export function termsForCustodyOrder(order: CustodyOrder, context: SaleContext,
|
||||
custodianId: string; host: string; feeBps: number; lockUntilHeight: number; expiresHeight: number;
|
||||
}): SaleTerms {
|
||||
check(order.status === 'awaiting-lock', 'Only awaiting-lock custody orders can draft candidate terms');
|
||||
// The unactivated candidate predates configurable hosting recipients. Never silently discard one.
|
||||
check(!order.hostFeeAddress || order.hostFeeAddress === ADDITIONAL_MARKET_FEE.address,
|
||||
'Custom host fee recipient requires a reviewed sale-candidate terms extension');
|
||||
const allocation = allocateXmrSale(parseAtomicXmr(order.grossAtomicXmr), options.feeBps);
|
||||
check(order.sellerAtomicXmr === allocation.sellerBeforeNetworkCosts.toString() && order.hostAtomicXmr === allocation.hosting.toString() &&
|
||||
order.authorAtomicXmr === allocation.author.toString() && order.authorAddress === ADDITIONAL_MARKET_FEE.address,
|
||||
|
||||
Reference in New Issue
Block a user