Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions pallets/afloat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ serde = { version = "1.0.140", default-features = false, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPT summary of 34a988 - d236c4:

  • Updated version of serde, scale-info, frame-support, frame-system, frame-benchmarking, sp-runtime, pallet-uniques, pallet-balances, pallet-timestamp, pallet-fruniques, pallet-rbac, pallet-gated-marketplace, and pallet-mapped-assets from polkadot-v0.9.40 to polkadot-v1.0.0.
  • Updated version of sp-core, sp-io, sp-runtime, and sp-std from polkadot-v0.9.40 to polkadot-v1.0.0.

"derive"
] }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false, optional = true }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
pallet-fruniques = { path = "../fruniques", default-features = false, version = "0.1.0-dev" }
pallet-rbac = { path = "../rbac/", default-features = false, version = "4.0.0-dev" }
pallet-gated-marketplace = { path = "../gated-marketplace/", default-features = false, version = "4.0.0-dev" }
pallet-mapped-assets = { path = "../mapped-assets/", default-features = false, version = "4.0.0-dev" }

[dev-dependencies]
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }

[features]
default = ["std"]
Expand Down
10 changes: 5 additions & 5 deletions pallets/afloat/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<T: Config> Pallet<T> {
AfloatCollectionId::<T>::put(collection_id);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPT summary of 4c39a1 - 037753:

  • Changed return type of create_fruniques_collection from Ok(()) to Err(Error::FailedToCreateFruniquesCollection)
  • Changed comparison operator in do_purchase_tax_credit from >= to >
  • Added semicolon to do_purchase_tax_credit after Err(Error::NotEnoughAfloatBalanceAvailable)
  • Added semicolon to do_purchase_tax_credit after Err(Error::TaxCreditAmountOverflow)
  • Added semicolon to do_purchase_tax_credit after Err(Error::Underflow)

Ok(())
} else {
return Err(Error::<T>::FailedToCreateFruniquesCollection.into())
return Err(Error::<T>::FailedToCreateFruniquesCollection.into());
}
}

Expand Down Expand Up @@ -461,8 +461,8 @@ impl<T: Config> Pallet<T> {
);
//ensure user has enough afloat balance
ensure!(
Self::do_get_afloat_balance(who.clone()) >=
offer.price_per_credit * tax_credit_amount.into(),
Self::do_get_afloat_balance(who.clone())
>= offer.price_per_credit * tax_credit_amount.into(),
Error::<T>::NotEnoughAfloatBalanceAvailable
);
let zero_balance: T::Balance = Zero::zero();
Expand Down Expand Up @@ -609,7 +609,7 @@ impl<T: Config> Pallet<T> {
let tax_credit_amount_u32 = if let Ok(amount) = transaction.tax_credit_amount.try_into() {
amount
} else {
return Err(Error::<T>::TaxCreditAmountOverflow.into())
return Err(Error::<T>::TaxCreditAmountOverflow.into());
};

let child_offer_id = pallet_gated_marketplace::Pallet::<T>::do_enlist_sell_offer(
Expand Down Expand Up @@ -713,7 +713,7 @@ impl<T: Config> Pallet<T> {
<AfloatOffers<T>>::try_mutate(offer_id, |offer| -> DispatchResult {
let offer = offer.as_mut().ok_or(Error::<T>::OfferNotFound)?;
if transaction.tax_credit_amount > offer.tax_credit_amount_remaining {
return Err(Error::<T>::Underflow.into())
return Err(Error::<T>::Underflow.into());
}
offer.tax_credit_amount_remaining =
offer.tax_credit_amount_remaining - transaction.tax_credit_amount;
Expand Down
Loading