Skip to content

Commit

Permalink
Extend Antelope lib AccountPermission instead of duplicating
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Dec 13, 2024
1 parent 9e5b6ad commit 417e0cf
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/permission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,7 @@ export class LinkedAction extends Struct {
export type WaitWeightType = WaitWeight | {wait_sec: UInt32Type; weight: UInt16Type}

@Struct.type('permission')
export class Permission extends Struct {
@Struct.field('name') declare perm_name: Name
@Struct.field('name') declare parent: Name
@Struct.field(Authority) declare required_auth: Authority
@Struct.field(LinkedAction, {array: true, optional: true}) declare linked_actions?: LinkedAction

static from(value: PermissionType): Permission {
if (isInstanceOf(value, Permission)) {
return value
}
return super.from(value) as Permission
}

export class Permission extends API.v1.AccountPermission {
get name(): Name {
return this.perm_name
}
Expand Down

0 comments on commit 417e0cf

Please sign in to comment.