mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Use an enum for Coin/NetworkId
It originally wasn't an enum so software which had yet to update before an integration wouldn't error (as now enums are strictly typed). The strict typing is preferable though.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use rand_core::{RngCore, OsRng};
|
||||
|
||||
use serai_client::{
|
||||
primitives::{BITCOIN_NET_ID, BITCOIN, BlockHash, SeraiAddress, Amount, Balance},
|
||||
primitives::{Amount, NetworkId, Coin, Balance, BlockHash, SeraiAddress},
|
||||
in_instructions::{
|
||||
primitives::{InInstruction, InInstructionWithBalance, Batch},
|
||||
InInstructionsEvent,
|
||||
@@ -15,7 +15,7 @@ use common::{serai, in_instructions::provide_batch};
|
||||
|
||||
serai_test!(
|
||||
async fn publish_batch() {
|
||||
let network = BITCOIN_NET_ID;
|
||||
let network = NetworkId::Bitcoin;
|
||||
let id = 0;
|
||||
|
||||
let mut block_hash = BlockHash([0; 32]);
|
||||
@@ -24,7 +24,7 @@ serai_test!(
|
||||
let mut address = SeraiAddress::new([0; 32]);
|
||||
OsRng.fill_bytes(&mut address.0);
|
||||
|
||||
let coin = BITCOIN;
|
||||
let coin = Coin::Bitcoin;
|
||||
let amount = Amount(OsRng.next_u64().saturating_add(1));
|
||||
let balance = Balance { coin, amount };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user