Unverified Commit bbfc9be2 authored by Demi Obenour's avatar Demi Obenour Committed by GitHub
Browse files

Add ‘transaction_version’ to the signed transaction (#1092)

This allows hardware wallets to know which transactions they can safely
sign.
parent c2969f7c
Pipeline #92693 failed with stages
in 5 minutes and 5 seconds
......@@ -595,7 +595,8 @@ impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime
let tip = 0;
let extra: SignedExtra = (
RestrictFunctionality,
system::CheckVersion::<Runtime>::new(),
system::CheckSpecVersion::<Runtime>::new(),
system::CheckTxVersion::<Runtime>::new(),
system::CheckGenesis::<Runtime>::new(),
system::CheckEra::<Runtime>::from(generic::Era::mortal(period, current_block)),
system::CheckNonce::<Runtime>::from(nonce),
......@@ -845,7 +846,8 @@ pub type BlockId = generic::BlockId<Block>;
/// The SignedExtension to the basic transaction logic.
pub type SignedExtra = (
RestrictFunctionality,
system::CheckVersion<Runtime>,
system::CheckSpecVersion<Runtime>,
system::CheckTxVersion<Runtime>,
system::CheckGenesis<Runtime>,
system::CheckEra<Runtime>,
system::CheckNonce<Runtime>,
......
......@@ -602,7 +602,8 @@ impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime
let tip = 0;
let extra: SignedExtra = (
OnlyStakingAndClaims,
system::CheckVersion::<Runtime>::new(),
system::CheckSpecVersion::<Runtime>::new(),
system::CheckTxVersion::<Runtime>::new(),
system::CheckGenesis::<Runtime>::new(),
system::CheckEra::<Runtime>::from(generic::Era::mortal(period, current_block)),
system::CheckNonce::<Runtime>::from(nonce),
......@@ -760,7 +761,8 @@ pub type BlockId = generic::BlockId<Block>;
pub type SignedExtra = (
// RELEASE: remove this for release build.
OnlyStakingAndClaims,
system::CheckVersion<Runtime>,
system::CheckSpecVersion<Runtime>,
system::CheckTxVersion<Runtime>,
system::CheckGenesis<Runtime>,
system::CheckEra<Runtime>,
system::CheckNonce<Runtime>,
......
......@@ -394,7 +394,8 @@ impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime
let tip = 0;
let extra: SignedExtra = (
RestrictFunctionality,
system::CheckVersion::<Runtime>::new(),
system::CheckSpecVersion::<Runtime>::new(),
system::CheckTxVersion::<Runtime>::new(),
system::CheckGenesis::<Runtime>::new(),
system::CheckEra::<Runtime>::from(generic::Era::mortal(period, current_block)),
system::CheckNonce::<Runtime>::from(nonce),
......@@ -531,7 +532,8 @@ pub type BlockId = generic::BlockId<Block>;
/// The SignedExtension to the basic transaction logic.
pub type SignedExtra = (
RestrictFunctionality,
system::CheckVersion<Runtime>,
system::CheckSpecVersion<Runtime>,
system::CheckTxVersion<Runtime>,
system::CheckGenesis<Runtime>,
system::CheckEra<Runtime>,
system::CheckNonce<Runtime>,
......
......@@ -454,7 +454,8 @@ impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime
let tip = 0;
let extra: SignedExtra = (
RestrictFunctionality,
system::CheckVersion::<Runtime>::new(),
system::CheckSpecVersion::<Runtime>::new(),
system::CheckTxVersion::<Runtime>::new(),
system::CheckGenesis::<Runtime>::new(),
system::CheckEra::<Runtime>::from(generic::Era::mortal(period, current_block)),
system::CheckNonce::<Runtime>::from(nonce),
......@@ -645,7 +646,8 @@ pub type BlockId = generic::BlockId<Block>;
/// The SignedExtension to the basic transaction logic.
pub type SignedExtra = (
RestrictFunctionality,
system::CheckVersion<Runtime>,
system::CheckSpecVersion<Runtime>,
system::CheckTxVersion<Runtime>,
system::CheckGenesis<Runtime>,
system::CheckEra<Runtime>,
system::CheckNonce<Runtime>,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment