File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -219,13 +219,8 @@ where
219
219
}
220
220
}
221
221
} ;
222
- let key = EntityKey {
223
- entity_type : entity_type. clone ( ) ,
224
- entity_id : entity_id. clone ( ) . into ( ) ,
225
- causality_region : CausalityRegion :: ONCHAIN , // Substreams don't currently support offchain data
226
- } ;
227
- let mut data: HashMap < Word , Value > = HashMap :: from_iter ( vec ! [ ] ) ;
228
222
223
+ let mut data: HashMap < Word , Value > = HashMap :: from_iter ( vec ! [ ] ) ;
229
224
for field in entity_change. fields . iter ( ) {
230
225
let new_value: & codec:: value:: Typed = match & field. new_value {
231
226
Some ( codec:: Value {
@@ -236,7 +231,7 @@ where
236
231
237
232
let value: Value = decode_value ( new_value) ?;
238
233
* data
239
- . entry ( Word :: from ( field. name . clone ( ) ) )
234
+ . entry ( Word :: from ( field. name . as_str ( ) ) )
240
235
. or_insert ( Value :: Null ) = value;
241
236
}
242
237
@@ -252,6 +247,12 @@ where
252
247
logger,
253
248
) ;
254
249
250
+ let key = EntityKey {
251
+ entity_type : entity_type,
252
+ entity_id : Word :: from ( entity_id) ,
253
+ causality_region : CausalityRegion :: ONCHAIN , // Substreams don't currently support offchain data
254
+ } ;
255
+
255
256
let id = state. entity_cache . schema . id_value ( & key) ?;
256
257
data. insert ( Word :: from ( "id" ) , id) ;
257
258
You can’t perform that action at this time.
0 commit comments