File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -757,7 +757,12 @@ export class MetadataStateEventProcessor extends BaseEventProcessor {
757757 'nft' in ddoInstance . getDDOData ( ) . indexedMetadata &&
758758 ddoInstance . getDDOData ( ) . indexedMetadata . nft . state !== metadataState
759759 ) {
760- let shortVersion = null
760+ let shortVersion : {
761+ id : any
762+ chainId : any
763+ nftAddress : any
764+ indexedMetadata : any
765+ } = null
761766
762767 if (
763768 ddoInstance . getDDOData ( ) . indexedMetadata . nft . state === MetadataStates . ACTIVE &&
@@ -785,7 +790,16 @@ export class MetadataStateEventProcessor extends BaseEventProcessor {
785790 // in case their state changes back to active.
786791 ddoInstance . getDDOData ( ) . indexedMetadata . nft . state = metadataState
787792 if ( shortVersion ) {
788- Object . assign ( ddoInstance . getDDOData ( ) , shortVersion )
793+ Object . keys ( ddoInstance . getDDOData ( ) ) . forEach ( ( key ) => {
794+ if ( ! ( key in shortVersion ) ) {
795+ delete ddoInstance . getDDOData ( ) [ key ]
796+ }
797+ } )
798+
799+ ddoInstance . getDDOData ( ) . id = shortVersion . id
800+ ddoInstance . getDDOData ( ) . chainId = shortVersion . chainId
801+ ddoInstance . getDDOData ( ) . nftAddress = shortVersion . nftAddress
802+ ddoInstance . getDDOData ( ) . indexedMetadata = shortVersion . indexedMetadata
789803 }
790804 } else {
791805 // Still update until we validate and polish schemas for DDO.
You can’t perform that action at this time.
0 commit comments