BREAKING: Rename Origin (#12258)

* BREAKING: Rename Origin

* more renaming

* a bit more renaming

* fix

* more fixing

* fix in frame_support

* even more fixes

* fix

* small fix

* ...

* update .stderr

* docs

* update docs

* update docs

* docs
This commit is contained in:
Sergej Sakac
2022-09-21 00:13:09 +02:00
committed by GitHub
parent 986d20b352
commit e4b6f4a66d
221 changed files with 5233 additions and 4200 deletions
+15 -7
View File
@@ -37,7 +37,7 @@ impl frame_system::Config for Test {
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
type Origin = Origin;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u64;
type Hash = H256;
@@ -100,7 +100,7 @@ fn two_party_successful_swap() {
// A creates the swap on chain1.
chain1.execute_with(|| {
AtomicSwap::create_swap(
Origin::signed(A),
RuntimeOrigin::signed(A),
B,
hashed_proof,
BalanceSwapAction::new(50),
@@ -115,7 +115,7 @@ fn two_party_successful_swap() {
// B creates the swap on chain2.
chain2.execute_with(|| {
AtomicSwap::create_swap(
Origin::signed(B),
RuntimeOrigin::signed(B),
A,
hashed_proof,
BalanceSwapAction::new(75),
@@ -129,8 +129,12 @@ fn two_party_successful_swap() {
// A reveals the proof and claims the swap on chain2.
chain2.execute_with(|| {
AtomicSwap::claim_swap(Origin::signed(A), proof.to_vec(), BalanceSwapAction::new(75))
.unwrap();
AtomicSwap::claim_swap(
RuntimeOrigin::signed(A),
proof.to_vec(),
BalanceSwapAction::new(75),
)
.unwrap();
assert_eq!(Balances::free_balance(A), 100 + 75);
assert_eq!(Balances::free_balance(B), 200 - 75);
@@ -138,8 +142,12 @@ fn two_party_successful_swap() {
// B use the revealed proof to claim the swap on chain1.
chain1.execute_with(|| {
AtomicSwap::claim_swap(Origin::signed(B), proof.to_vec(), BalanceSwapAction::new(50))
.unwrap();
AtomicSwap::claim_swap(
RuntimeOrigin::signed(B),
proof.to_vec(),
BalanceSwapAction::new(50),
)
.unwrap();
assert_eq!(Balances::free_balance(A), 100 - 50);
assert_eq!(Balances::free_balance(B), 200 + 50);