File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -200,22 +200,14 @@ export class GoodEntryController {
200200
201201 const goodEntry = new GoodEntry ( entry ) ;
202202 Object . assign ( goodEntry , pogProfile ) ;
203- if ( entry . externalId ) {
204- const encodedExternalId = utils . formatBytes32String ( entry . externalId ) ;
205- Object . assign ( goodEntry , {
206- externalId : encodedExternalId ,
207- } ) ;
208- }
203+ const encodedExternalId = utils . formatBytes32String ( entry ?. externalId ?? "" ) ;
204+ Object . assign ( goodEntry , {
205+ externalId : encodedExternalId ,
206+ } ) ;
209207 const persistGoodEntryData = new GoodEntry ( {
210-
208+ ... goodEntry ,
211209 doGooder : goodEntry ?. doGooder ?. toLowerCase ( ) ,
212- userId : goodEntry . userId ,
213210 email : entry . email ,
214- goodActivityId : goodEntry . goodActivityId ,
215- goodOracleId : goodEntry . goodOracleId ,
216- goodPoints : goodEntry . goodPoints ,
217- units : goodEntry . units ,
218- timestamp : goodEntry . timestamp ,
219211 externalId : entry ?. externalId ,
220212 } ) ;
221213 try {
You can’t perform that action at this time.
0 commit comments