Skip to content

Commit

Permalink
Merge pull request #129 from kodadot/fix/issuer
Browse files Browse the repository at this point in the history
(Fix): CHANGEISSUER cannot proceed
  • Loading branch information
vikiival authored Oct 23, 2023
2 parents 43941d7 + acf548e commit caea672
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@

# IDE files
/.idea
/suite
/suite
/.vscode
12 changes: 6 additions & 6 deletions src/mappings/nfts/getters/statemine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,18 +321,18 @@ 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) : '',
}
}

ctx.log.warn('USING UNSAFE GETTER! PLS UPDATE TYPES!')
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) : '',
}
}
12 changes: 6 additions & 6 deletions src/mappings/nfts/getters/statemint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,18 +321,18 @@ 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) : '',
}
}

ctx.log.warn('USING UNSAFE GETTER! PLS UPDATE TYPES!')
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) : '',
}
}

0 comments on commit caea672

Please sign in to comment.