File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -296,8 +296,12 @@ fn get_unit_html(
296
296
#[ cfg( test) ]
297
297
mod test {
298
298
use super :: * ;
299
+ use adex_primitives:: ValidatorId ;
300
+ use std:: convert:: TryFrom ;
299
301
300
302
fn get_ad_unit ( media_mime : & str ) -> AdUnit {
303
+ let owner = ValidatorId :: try_from ( "0xce07CbB7e054514D590a0262C93070D838bFBA2e" )
304
+ . expect ( "Should be valid ValidatorId string" ) ;
301
305
AdUnit {
302
306
ipfs : "" . to_string ( ) ,
303
307
ad_type : "" . to_string ( ) ,
@@ -307,7 +311,7 @@ mod test {
307
311
targeting : vec ! [ ] ,
308
312
min_targeting_score : None ,
309
313
tags : vec ! [ ] ,
310
- owner : "" . to_string ( ) ,
314
+ owner,
311
315
created : Utc :: now ( ) ,
312
316
title : None ,
313
317
description : None ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use chrono::serde::{ts_milliseconds, ts_milliseconds_option};
2
2
use chrono:: { DateTime , Utc } ;
3
3
use serde:: { Deserialize , Serialize } ;
4
4
5
- use crate :: TargetingTag ;
5
+ use crate :: { TargetingTag , ValidatorId } ;
6
6
7
7
#[ derive( Serialize , Deserialize , Debug , Clone ) ]
8
8
#[ serde( rename_all = "camelCase" ) ]
@@ -34,7 +34,7 @@ pub struct AdUnit {
34
34
#[ serde( default ) ]
35
35
pub tags : Vec < TargetingTag > ,
36
36
/// user address from the session
37
- pub owner : String ,
37
+ pub owner : ValidatorId ,
38
38
/// number, UTC timestamp in milliseconds, used as nonce for escaping duplicated spec ipfs hashes
39
39
#[ serde( with = "ts_milliseconds" ) ]
40
40
pub created : DateTime < Utc > ,
You can’t perform that action at this time.
0 commit comments