File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed
Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -6,23 +6,8 @@ pub struct ExchangeRate {
66 pub currency_code : String ,
77 #[ n( 1 ) ]
88 pub rate : f32 ,
9- }
10-
11- impl ExchangeRate {
12- pub fn new ( currency_code : & str , rate : f32 ) -> Self {
13- Self {
14- currency_code : currency_code. to_string ( ) ,
15- rate,
16- }
17- }
18-
19- pub fn currency_code ( & self ) -> & str {
20- & self . currency_code
21- }
22-
23- pub fn rate ( & self ) -> f32 {
24- self . rate
25- }
9+ #[ n( 2 ) ]
10+ pub timestamp : u64 ,
2611}
2712
2813#[ quantum_link]
Original file line number Diff line number Diff line change @@ -439,7 +439,11 @@ fn test_replay_check() {
439439 let envoy = QuantumLinkIdentity :: generate ( ) ;
440440 let passport = QuantumLinkIdentity :: generate ( ) ;
441441
442- let fx_rate = ExchangeRate :: new ( "USD" , 0.85 ) ;
442+ let fx_rate = ExchangeRate {
443+ currency_code : "USD" ,
444+ rate : 0.85 ,
445+ timestamp : 0 ,
446+ } ;
443447 let message = EnvoyMessage {
444448 message : QuantumLinkMessage :: ExchangeRate ( fx_rate) ,
445449 timestamp : 123456 ,
You can’t perform that action at this time.
0 commit comments