Skip to content

Commit a2f1057

Browse files
committed
fix: proper seller is owner
1 parent 10a0931 commit a2f1057

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contracts/asset/src/execute.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ where
6060
// Save the listing
6161
let listing = ListingInfo {
6262
id: id.clone(),
63-
seller: info.sender.clone(),
63+
seller: nft_info.owner.clone(),
6464
price: price.clone(),
6565
reserved: reservation.clone(),
6666
marketplace_fee_bps: validated_marketplace_fee_bps,
@@ -73,7 +73,7 @@ where
7373
.add_attribute("collection", env.contract.address.clone())
7474
.add_attribute("price", price.amount.to_string())
7575
.add_attribute("denom", price.denom.to_string())
76-
.add_attribute("seller", info.sender.clone().to_string())
76+
.add_attribute("seller", nft_info.owner.clone().to_string())
7777
.add_attribute(
7878
"reserved_until",
7979
reservation.map_or("none".to_string(), |r| r.reserved_until.to_string()),
@@ -490,7 +490,7 @@ fn test_list() {
490490
("collection".to_string(), env.contract.address.to_string()),
491491
("price".to_string(), price.amount.to_string()),
492492
("denom".to_string(), "uxion".to_string()),
493-
("seller".to_string(), approver_addr.to_string()),
493+
("seller".to_string(), owner_addr.to_string()),
494494
("reserved_until".to_string(), "none".to_string()),
495495
],
496496
);
@@ -501,7 +501,7 @@ fn test_list() {
501501
.load(deps.as_ref().storage, "token-3"),
502502
);
503503
assert_eq!(stored.price, price);
504-
assert_eq!(stored.seller, approver_addr);
504+
assert_eq!(stored.seller, owner_addr);
505505
assert!(stored.reserved.is_none());
506506
}
507507

@@ -554,7 +554,7 @@ fn test_list() {
554554
("collection".to_string(), env.contract.address.to_string()),
555555
("price".to_string(), price.amount.to_string()),
556556
("denom".to_string(), "uxion".to_string()),
557-
("seller".to_string(), operator_addr.to_string()),
557+
("seller".to_string(), owner_addr.to_string()),
558558
("reserved_until".to_string(), "none".to_string()),
559559
],
560560
);
@@ -565,7 +565,7 @@ fn test_list() {
565565
.load(deps.as_ref().storage, "token-4"),
566566
);
567567
assert_eq!(stored.price, price);
568-
assert_eq!(stored.seller, operator_addr);
568+
assert_eq!(stored.seller, owner_addr);
569569
assert!(stored.reserved.is_none());
570570
}
571571

0 commit comments

Comments
 (0)