File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
graph/src/components/ethereum Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ pub struct EthereumEventData {
8787 pub address : Address ,
8888 pub log_index : U256 ,
8989 pub transaction_log_index : U256 ,
90- pub log_type : String ,
90+ pub log_type : Option < String > ,
9191 pub block : EthereumBlockData ,
9292 pub transaction : EthereumTransactionData ,
9393 pub params : Vec < LogParam > ,
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ where
219219 address : log. address ,
220220 log_index : log. log_index . unwrap_or ( U256 :: zero ( ) ) ,
221221 transaction_log_index : log. transaction_log_index . unwrap_or ( U256 :: zero ( ) ) ,
222- log_type : log. log_type . clone ( ) . unwrap_or ( "None" . to_string ( ) ) ,
222+ log_type : log. log_type . clone ( ) ,
223223 params,
224224 } ;
225225
Original file line number Diff line number Diff line change @@ -295,7 +295,11 @@ impl ToAscObj<AscEthereumEvent> for EthereumEventData {
295295 log_index : heap. asc_new ( & BigInt :: from_unsigned_u256 ( & self . log_index ) ) ,
296296 transaction_log_index : heap
297297 . asc_new ( & BigInt :: from_unsigned_u256 ( & self . transaction_log_index ) ) ,
298- log_type : heap. asc_new ( & self . log_type ) ,
298+ log_type : self
299+ . log_type
300+ . clone ( )
301+ . map ( |log_type| heap. asc_new ( & log_type) )
302+ . unwrap_or_else ( || AscPtr :: null ( ) ) ,
299303 block : heap. asc_new ( & self . block ) ,
300304 transaction : heap. asc_new ( & self . transaction ) ,
301305 params : heap. asc_new ( self . params . as_slice ( ) ) ,
You can’t perform that action at this time.
0 commit comments