mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 18:57:57 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user