Skip to content

Commit

Permalink
fix: 1 letter domain name (#33)
Browse files Browse the repository at this point in the history
* fix: 1 letter domain name

* test: update tests to new pricing
  • Loading branch information
Th0rgal authored May 1, 2024
1 parent 6719346 commit 2fa1c34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pricing.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_pricing.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2fa1c34

Please sign in to comment.