@@ -14,7 +14,6 @@ use daemon::projection::FeedReceivers;
14
14
use daemon:: seed;
15
15
use daemon:: seed:: RANDOM_SEED_SIZE ;
16
16
use daemon:: wallet;
17
- use daemon:: Environment ;
18
17
use daemon:: TakerActorSystem ;
19
18
use http_api_problem:: HttpApiProblem ;
20
19
use http_api_problem:: StatusCode ;
@@ -71,7 +70,6 @@ pub async fn feed(
71
70
rx_maker_status : & State < watch:: Receiver < ConnectionStatus > > ,
72
71
rx_maker_identity : & State < watch:: Receiver < Option < identify:: PeerInfo > > > ,
73
72
identity_info : & State < IdentityInfo > ,
74
- environment : & State < Environment > ,
75
73
_user : User ,
76
74
) -> EventStream ! [ ] {
77
75
let rx = rx. inner ( ) ;
@@ -84,7 +82,6 @@ pub async fn feed(
84
82
let identity = identity_info. inner ( ) . clone ( ) ;
85
83
let mut heartbeat =
86
84
tokio:: time:: interval ( std:: time:: Duration :: from_secs ( HEARTBEAT_INTERVAL_SECS ) ) ;
87
- let environment = environment. inner ( ) . clone ( ) ;
88
85
89
86
EventStream ! {
90
87
@@ -99,8 +96,6 @@ pub async fn feed(
99
96
100
97
yield Event :: json( & identity) . event( "identity" ) ;
101
98
102
- yield Event :: json( & environment) . event( "environment" ) ;
103
-
104
99
let offers = rx_offers. borrow( ) . clone( ) ;
105
100
yield Event :: json( & offers. btcusd_long) . event( "btcusd_long_offer" ) ;
106
101
yield Event :: json( & offers. btcusd_short) . event( "btcusd_short_offer" ) ;
@@ -316,15 +311,8 @@ pub async fn put_sync_wallet(taker: &State<Taker>, _user: User) -> Result<(), Ht
316
311
#[ instrument( name = "GET /export" , skip_all) ]
317
312
pub async fn get_export_seed < ' a > (
318
313
data_dir : & ' a State < PathBuf > ,
319
- environment : & ' a State < Environment > ,
320
314
_user : User ,
321
315
) -> Result < DownloadResponsePro < ' a > , HttpApiProblem > {
322
- if environment. inner ( ) . as_string ( ) == "umbrel" {
323
- return Err ( HttpApiProblem :: new ( StatusCode :: BAD_REQUEST )
324
- . title ( "Could not export seed file" )
325
- . detail ( "Cannot export seed file for umbrel environment" ) ) ;
326
- }
327
-
328
316
let seed = tokio:: fs:: read ( data_dir. join ( seed:: TAKER_WALLET_SEED_FILE ) )
329
317
. await
330
318
. map_err ( |e| {
@@ -335,7 +323,7 @@ pub async fn get_export_seed<'a>(
335
323
336
324
let resp = DownloadResponsePro :: from_vec (
337
325
seed,
338
- Some ( "taker_seed" ) ,
326
+ Some ( seed :: TAKER_WALLET_SEED_FILE ) ,
339
327
Some ( mime:: APPLICATION_OCTET_STREAM ) ,
340
328
) ;
341
329
Ok ( resp)
@@ -348,14 +336,7 @@ pub async fn put_import_seed(
348
336
taker : & State < Taker > ,
349
337
data_dir : & State < PathBuf > ,
350
338
network : & State < Network > ,
351
- environment : & State < Environment > ,
352
339
) -> Result < ( ) , HttpApiProblem > {
353
- if environment. inner ( ) . as_string ( ) == "umbrel" {
354
- return Err ( HttpApiProblem :: new ( StatusCode :: BAD_REQUEST )
355
- . title ( "Could not import seed file" )
356
- . detail ( "Cannot import seed file for umbrel environment" ) ) ;
357
- }
358
-
359
340
// fetch seed from upload stream as bytes. we only support the random seed.
360
341
let seed = seed
361
342
. open ( RANDOM_SEED_SIZE . bytes ( ) )
0 commit comments