Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 1 letter domain name #33

Merged
merged 2 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading