Skip to content

Commit

Permalink
always allow azero deposits and withdraws
Browse files Browse the repository at this point in the history
  • Loading branch information
caglavol committed Jan 30, 2024
1 parent 914efd3 commit eed2813
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions contracts/src/market/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,6 @@ pub mod market {
pub fn deposit_native(&mut self) -> Result<(), MarketError> {
let caller = self.env().caller();

if self.underlying_asset != self.wazero {
return Err(MarketError::NotSupported);
}

let transferred_amount = self.env().transferred_value();
self.wrap_native(transferred_amount)?;

Expand Down Expand Up @@ -455,10 +451,6 @@ pub mod market {
pub fn withdraw_native(&mut self, deposit_token_amount: u128) -> Result<(), MarketError> {
let caller = self.env().caller();

if self.underlying_asset != self.wazero {
return Err(MarketError::NotSupported);
}

let token_amount = self.burn_and_calculate_amount(caller, deposit_token_amount)?;

let mut wazero: contract_ref!(WrappedAZERO) = self.underlying_asset.into();
Expand Down

0 comments on commit eed2813

Please sign in to comment.