mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
Remove unused code (#7027)
Signed-off-by: Jimmy Chu <jimmychu0807@gmail.com>
This commit is contained in:
@@ -165,7 +165,7 @@ decl_storage! {
|
||||
decl_event!(
|
||||
/// Events generated by the module.
|
||||
pub enum Event<T> where AccountId = <T as frame_system::Trait>::AccountId {
|
||||
/// Event generated when new price is accepted to contribute to the average.
|
||||
/// Event generated when new price is accepted to contribute to the average.
|
||||
/// [price, who]
|
||||
NewPrice(u32, AccountId),
|
||||
}
|
||||
@@ -461,16 +461,6 @@ impl<T: Trait> Module<T> {
|
||||
// Note this call will block until response is received.
|
||||
let price = Self::fetch_price().map_err(|_| "Failed to fetch price")?;
|
||||
|
||||
// Received price is wrapped into a call to `submit_price_unsigned` public function of this
|
||||
// pallet. This means that the transaction, when executed, will simply call that function
|
||||
// passing `price` as an argument.
|
||||
let call = Call::submit_price_unsigned(block_number, price);
|
||||
|
||||
// Now let's create a transaction out of this call and submit it to the pool.
|
||||
// Here we showcase two ways to send an unsigned transaction with a signed payload
|
||||
SubmitTransaction::<T, Call<T>>::submit_unsigned_transaction(call.into())
|
||||
.map_err(|()| "Unable to submit unsigned transaction.")?;
|
||||
|
||||
// -- Sign using any account
|
||||
let (_, result) = Signer::<T, T::AuthorityId>::any_account().send_unsigned_transaction(
|
||||
|account| PricePayload {
|
||||
@@ -500,16 +490,6 @@ impl<T: Trait> Module<T> {
|
||||
// Note this call will block until response is received.
|
||||
let price = Self::fetch_price().map_err(|_| "Failed to fetch price")?;
|
||||
|
||||
// Received price is wrapped into a call to `submit_price_unsigned` public function of this
|
||||
// pallet. This means that the transaction, when executed, will simply call that function
|
||||
// passing `price` as an argument.
|
||||
let call = Call::submit_price_unsigned(block_number, price);
|
||||
|
||||
// Now let's create a transaction out of this call and submit it to the pool.
|
||||
// Here we showcase two ways to send an unsigned transaction with a signed payload
|
||||
SubmitTransaction::<T, Call<T>>::submit_unsigned_transaction(call.into())
|
||||
.map_err(|()| "Unable to submit unsigned transaction.")?;
|
||||
|
||||
// -- Sign using all accounts
|
||||
let transaction_results = Signer::<T, T::AuthorityId>::all_accounts()
|
||||
.send_unsigned_transaction(
|
||||
|
||||
Reference in New Issue
Block a user