Skip to content

Commit

Permalink
Changed SalePriceInNear to be SalePriceInYoctoNear to remove confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
BenKurrek committed Dec 21, 2021
1 parent 3949044 commit 59d87f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion market-contract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const STORAGE_PER_SALE: u128 = 1000 * STORAGE_PRICE_PER_BYTE;
static DELIMETER: &str = ".";

//Creating custom types to use within the contract. This makes things more readable.
pub type SalePriceInNear = U128;
pub type SalePriceInYoctoNear = U128;
pub type TokenId = String;
pub type FungibleTokenId = AccountId;
pub type ContractAndTokenId = String;
Expand Down
2 changes: 1 addition & 1 deletion market-contract/src/nft_callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::*;
#[derive(Serialize, Deserialize)]
#[serde(crate = "near_sdk::serde")]
pub struct SaleArgs {
pub sale_conditions: SalePriceInNear,
pub sale_conditions: SalePriceInYoctoNear,
}

/*
Expand Down
4 changes: 2 additions & 2 deletions market-contract/src/sale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pub struct Sale {
pub nft_contract_id: String,
//actual token ID for sale
pub token_id: String,
//sale price in NEAR that the token is listed for
pub sale_conditions: SalePriceInNear,
//sale price in yoctoNEAR that the token is listed for
pub sale_conditions: SalePriceInYoctoNear,
}

#[near_bindgen]
Expand Down

0 comments on commit 59d87f2

Please sign in to comment.