mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
Various simplifications re: Serai transactions
Removes PairSigner for the pair directly. Resets spec_version to 1. Defines the extrinsic without its length prefix, only prefixing during publish.
This commit is contained in:
@@ -12,7 +12,7 @@ use ciphersuite::{group::GroupEncoding, Ciphersuite, Secp256k1};
|
||||
use dkg::Participant;
|
||||
|
||||
use serai_client::{
|
||||
PairTrait, PairSigner,
|
||||
PairTrait,
|
||||
primitives::{
|
||||
NetworkId, Coin, Amount, Balance, BlockHash, SeraiAddress, ExternalAddress,
|
||||
insecure_pair_from_name,
|
||||
@@ -211,7 +211,7 @@ async fn sign_test() {
|
||||
let balance = Balance { coin: Coin::Serai, amount: Amount(1_000_000_000) };
|
||||
serai
|
||||
.publish(&serai.sign(
|
||||
&PairSigner::new(insecure_pair_from_name("Ferdie")),
|
||||
&insecure_pair_from_name("Ferdie"),
|
||||
&SeraiCoins::transfer(address, balance),
|
||||
0,
|
||||
Default::default(),
|
||||
@@ -219,7 +219,7 @@ async fn sign_test() {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
(PairSigner::new(pair), address)
|
||||
(pair, address)
|
||||
};
|
||||
|
||||
#[allow(clippy::inconsistent_digit_grouping)]
|
||||
|
||||
@@ -16,7 +16,7 @@ use serai_client::{
|
||||
validator_sets::primitives::{Session, ValidatorSet},
|
||||
in_instructions::primitives::Shorthand,
|
||||
coins::primitives::{OutInstruction, OutInstructionWithBalance},
|
||||
PairTrait, PairSigner, SeraiCoins,
|
||||
PairTrait, SeraiCoins,
|
||||
};
|
||||
|
||||
use crate::tests::*;
|
||||
@@ -249,7 +249,7 @@ async fn mint_and_burn_test() {
|
||||
let balance = Balance { coin: Coin::Serai, amount: Amount(1_000_000_000) };
|
||||
serai
|
||||
.publish(&serai.sign(
|
||||
&PairSigner::new(insecure_pair_from_name("Ferdie")),
|
||||
&insecure_pair_from_name("Ferdie"),
|
||||
&SeraiCoins::transfer(address, balance),
|
||||
0,
|
||||
Default::default(),
|
||||
@@ -257,7 +257,7 @@ async fn mint_and_burn_test() {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
(PairSigner::new(pair), address)
|
||||
(pair, address)
|
||||
};
|
||||
|
||||
// Send in BTC
|
||||
|
||||
Reference in New Issue
Block a user