mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 07:31:08 +00:00
Remove unused code (#7027)
Signed-off-by: Jimmy Chu <jimmychu0807@gmail.com>
This commit is contained in:
@@ -461,16 +461,6 @@ impl<T: Trait> Module<T> {
|
|||||||
// Note this call will block until response is received.
|
// Note this call will block until response is received.
|
||||||
let price = Self::fetch_price().map_err(|_| "Failed to fetch price")?;
|
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
|
// -- Sign using any account
|
||||||
let (_, result) = Signer::<T, T::AuthorityId>::any_account().send_unsigned_transaction(
|
let (_, result) = Signer::<T, T::AuthorityId>::any_account().send_unsigned_transaction(
|
||||||
|account| PricePayload {
|
|account| PricePayload {
|
||||||
@@ -500,16 +490,6 @@ impl<T: Trait> Module<T> {
|
|||||||
// Note this call will block until response is received.
|
// Note this call will block until response is received.
|
||||||
let price = Self::fetch_price().map_err(|_| "Failed to fetch price")?;
|
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
|
// -- Sign using all accounts
|
||||||
let transaction_results = Signer::<T, T::AuthorityId>::all_accounts()
|
let transaction_results = Signer::<T, T::AuthorityId>::all_accounts()
|
||||||
.send_unsigned_transaction(
|
.send_unsigned_transaction(
|
||||||
|
|||||||
Reference in New Issue
Block a user