diff --git a/.gitignore b/.gitignore index 3df1c809..72d350dd 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ # IDE files /.idea -/suite \ No newline at end of file +/suite +/.vscode \ No newline at end of file diff --git a/src/mappings/nfts/getters/statemine.ts b/src/mappings/nfts/getters/statemine.ts index 55703c2c..af7cfba4 100644 --- a/src/mappings/nfts/getters/statemine.ts +++ b/src/mappings/nfts/getters/statemine.ts @@ -321,9 +321,9 @@ export function getChangeTeamEvent(ctx: Context): ChangeCollectionTeam { const { collection: classId, issuer, admin, freezer } = event.asV9420 return { id: classId.toString(), - issuer: addressOf(issuer || ''), - admin: addressOf(admin || ''), - freezer: addressOf(freezer || ''), + issuer: issuer ? addressOf(issuer) : '', + admin: admin ? addressOf(admin) : '', + freezer: freezer ? addressOf(freezer) : '', } } @@ -331,8 +331,8 @@ export function getChangeTeamEvent(ctx: Context): ChangeCollectionTeam { const { collection: classId, issuer, admin, freezer } = ctx._chain.decodeEvent(ctx.event) return { id: classId.toString(), - issuer: addressOf(issuer || ''), - admin: addressOf(admin || ''), - freezer: addressOf(freezer || ''), + issuer: issuer ? addressOf(issuer) : '', + admin: admin ? addressOf(admin) : '', + freezer: freezer ? addressOf(freezer) : '', } } diff --git a/src/mappings/nfts/getters/statemint.ts b/src/mappings/nfts/getters/statemint.ts index a577bd6f..fbe2ca97 100644 --- a/src/mappings/nfts/getters/statemint.ts +++ b/src/mappings/nfts/getters/statemint.ts @@ -321,9 +321,9 @@ export function getChangeTeamEvent(ctx: Context): ChangeCollectionTeam { const { collection: classId, issuer, admin, freezer } = event.asV9430 return { id: classId.toString(), - issuer: addressOf(issuer || ''), - admin: addressOf(admin || ''), - freezer: addressOf(freezer || ''), + issuer: issuer ? addressOf(issuer) : '', + admin: admin ? addressOf(admin) : '', + freezer: freezer ? addressOf(freezer) : '', } } @@ -331,8 +331,8 @@ export function getChangeTeamEvent(ctx: Context): ChangeCollectionTeam { const { collection: classId, issuer, admin, freezer } = ctx._chain.decodeEvent(ctx.event) return { id: classId.toString(), - issuer: addressOf(issuer || ''), - admin: addressOf(admin || ''), - freezer: addressOf(freezer || ''), + issuer: issuer ? addressOf(issuer) : '', + admin: admin ? addressOf(admin) : '', + freezer: freezer ? addressOf(freezer) : '', } }