mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 21:19:24 +00:00
Have a public monero-rpc type be properly formatted
It was public as the raw RPC response. It's more polite to handle the formatting in the RPC, and allows us to return a better structure.
This commit is contained in:
@@ -2,7 +2,7 @@ use monero_simple_request_rpc::SimpleRequestRpc;
|
||||
use monero_wallet::{
|
||||
DEFAULT_LOCK_WINDOW,
|
||||
transaction::Transaction,
|
||||
rpc::{OutputResponse, Rpc, DecoyRpc},
|
||||
rpc::{Rpc, DecoyRpc},
|
||||
WalletOutput,
|
||||
};
|
||||
|
||||
@@ -54,8 +54,7 @@ test!(
|
||||
let most_recent_o_index = rpc.get_o_indexes(tx.hash()).await.unwrap().pop().unwrap();
|
||||
|
||||
// Make sure output from tx1 is in the block in which it unlocks
|
||||
let out_tx1: OutputResponse =
|
||||
rpc.get_outs(&[most_recent_o_index]).await.unwrap().swap_remove(0);
|
||||
let out_tx1 = rpc.get_outs(&[most_recent_o_index]).await.unwrap().swap_remove(0);
|
||||
assert_eq!(out_tx1.height, height - DEFAULT_LOCK_WINDOW);
|
||||
assert!(out_tx1.unlocked);
|
||||
|
||||
@@ -133,8 +132,7 @@ test!(
|
||||
let most_recent_o_index = rpc.get_o_indexes(tx.hash()).await.unwrap().pop().unwrap();
|
||||
|
||||
// Make sure output from tx1 is in the block in which it unlocks
|
||||
let out_tx1: OutputResponse =
|
||||
rpc.get_outs(&[most_recent_o_index]).await.unwrap().swap_remove(0);
|
||||
let out_tx1 = rpc.get_outs(&[most_recent_o_index]).await.unwrap().swap_remove(0);
|
||||
assert_eq!(out_tx1.height, height - DEFAULT_LOCK_WINDOW);
|
||||
assert!(out_tx1.unlocked);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user