Skip to content

Commit

Permalink
removed commented codes
Browse files Browse the repository at this point in the history
  • Loading branch information
hakymulla committed Nov 30, 2024
1 parent 28f1a83 commit eb96c5c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions onchain/cairo/src/afk_id/nameservice.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -415,26 +415,12 @@ pub mod Nameservice {
// Create a new order
let bidder = get_caller_address();

// let quote_token = self.token_quote.read();
// check if new bidder already has an outbidded amount for the username(still in the contract)
// let bidder_amount = self.order_return.entry(bidder).entry(username).read();
// self.order_return.entry(bidder).entry(username).write(0);

// if amount > bidder_amount {
// if self.is_payment_enabled.read() {
// let payment_token = IERC20Dispatcher { contract_address: quote_token };
// payment_token.transfer_from(bidder, get_contract_address(), (amount - bidder_amount));
// }
// }

let payment_token = IERC20Dispatcher { contract_address: self.token_quote.read() };
payment_token.transfer_from(bidder, get_contract_address(), amount);

let order_id = self.order_count.entry(username).read() + 1_u256;
let new_order = Order { id: order_id, bidder: bidder, amount: amount, is_active: true };

// let old_order = self.orders.read(username);

// Store the order
self.orders.entry((username, order_id)).write(new_order);
self.order_count.entry(username).write(order_id);
Expand Down

0 comments on commit eb96c5c

Please sign in to comment.