From 2fa1c34e7eb792894aa8a4bbbdfea0ab355269cb Mon Sep 17 00:00:00 2001 From: Thomas Marchand Date: Wed, 1 May 2024 16:23:13 +0100 Subject: [PATCH] fix: 1 letter domain name (#33) * fix: 1 letter domain name * test: update tests to new pricing --- src/pricing.cairo | 2 +- src/tests/test_pricing.cairo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pricing.cairo b/src/pricing.cairo index 33a2932..9e80e93 100644 --- a/src/pricing.cairo +++ b/src/pricing.cairo @@ -44,7 +44,7 @@ mod Pricing { impl InternalImpl of InternalTrait { fn get_price_per_day(self: @ContractState, domain_len: usize) -> u128 { if domain_len == 1 { - return 534246575342466; + return 801369863013699; } if domain_len == 2 { diff --git a/src/tests/test_pricing.cairo b/src/tests/test_pricing.cairo index 3df6b56..d82662d 100644 --- a/src/tests/test_pricing.cairo +++ b/src/tests/test_pricing.cairo @@ -24,7 +24,7 @@ fn test_buy_price() { // Test with "b" / 1 letter and one year let (erc20, price) = pricing.compute_buy_price(1, 365); assert(erc20.into() == 0x123, 'wrong erc20 address'); - assert(price == 195000000000000090, 'incorrect price'); + assert(price == 292500000000000135, 'incorrect price'); // Test with "be" / 2 letters and one year let (_erc20, price) = pricing.compute_buy_price(2, 365);