This commit is contained in:
einhornimmond 2025-06-23 13:59:15 +02:00
parent fbd38d2e5a
commit 3afecc0c18
4 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,6 @@ export async function validateAlias(alias: string): Promise<true> {
logger.warn('invalid alias', alias, (err as ZodError).errors)
throw new Error((err as ZodError).errors[0].message)
}
console.log(err)
throw err
}

View File

@ -1,3 +1,3 @@
export * from './schema'
export * from './enum'
export * from './logic'
export * from './logic/decay'

View File

@ -10,6 +10,7 @@ describe('utils/decay', () => {
// TODO: toString() was required, we could not compare two decimals
expect(decayFormula(amount, seconds).toString()).toBe('0.999999978035040489732012')
})
it('has correct backward calculation', () => {
const amount = new Decimal(1.0)
const seconds = -1
@ -25,6 +26,7 @@ describe('utils/decay', () => {
expect(decayFormula(amount, seconds).toString()).toBe('1.0')
})
})
it('has base 0.99999997802044727', () => {
const now = new Date()
now.setSeconds(1)

View File

@ -1,4 +1,3 @@
import { LOG4JS_BASE_CATEGORY_NAME } from '../const'
export const LOG4JS_LOGIC_CATEGORY = `${LOG4JS_BASE_CATEGORY_NAME}.logic`
export { calculateDecay, Decay } from './decay'