Skip to content

Commit 10a0931

Browse files
committed
chore: remove unwrap()
1 parent f600728 commit 10a0931

File tree

9 files changed

+480
-478
lines changed

9 files changed

+480
-478
lines changed

contracts/asset/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ logic without rewriting the core token implementation.
3434
route. These are automatically dispatched through `SellableAsset` when `DefaultAssetContract`
3535
handles `execute_extension`.
3636
- `Reserve` captures an optional reservation window (`Expiration`) and address, used to gate buys.
37-
- `ListingInfo` stores price, seller, reserve data, and a snapshot of the NFT metadata so listings
38-
remain consistent even if the token attributes change later.
37+
- `ListingInfo` stores price, seller, reservation data, and marketplace fee settings. The contract
38+
fetches NFT metadata directly from the `cw721` state when needed instead of duplicating it in the
39+
listing storage.
3940
- `AssetConfig` centralizes the contract's storage maps and exposes helper constructors so you can
4041
use custom storage keys when embedding the contract inside another crate.
4142

contracts/asset/src/contracts/asset_base.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ pub fn query(
7272

7373
use crate::error::ContractError;
7474

75-
let contract: AssetBaseContract<'static> = AssetContract::default();
75+
let contract: AssetBaseContract<'static> = AssetContract::default();
7676

77-
contract.query(deps, &env, msg).map_err(|err| ContractError::from(err).into())
77+
contract
78+
.query(deps, &env, msg)
79+
.map_err(|err| ContractError::from(err).into())
7880
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pub mod asset_base;
1+
pub mod asset_base;

contracts/asset/src/error.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ pub enum ContractError {
3333

3434
#[error("Invalid marketplace fee: {bps}, {recipient}")]
3535
InvalidMarketplaceFee { bps: u16, recipient: String },
36-
3736
}
3837

3938
impl From<ContractError> for cw721::error::Cw721ContractError {

0 commit comments

Comments
 (0)