Skip to content

Commit 417e0cf

Browse files
committedDec 13, 2024·
Extend Antelope lib AccountPermission instead of duplicating
1 parent 9e5b6ad commit 417e0cf

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed
 

‎src/permission.ts

+1-13
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,7 @@ export class LinkedAction extends Struct {
5959
export type WaitWeightType = WaitWeight | {wait_sec: UInt32Type; weight: UInt16Type}
6060

6161
@Struct.type('permission')
62-
export class Permission extends Struct {
63-
@Struct.field('name') declare perm_name: Name
64-
@Struct.field('name') declare parent: Name
65-
@Struct.field(Authority) declare required_auth: Authority
66-
@Struct.field(LinkedAction, {array: true, optional: true}) declare linked_actions?: LinkedAction
67-
68-
static from(value: PermissionType): Permission {
69-
if (isInstanceOf(value, Permission)) {
70-
return value
71-
}
72-
return super.from(value) as Permission
73-
}
74-
62+
export class Permission extends API.v1.AccountPermission {
7563
get name(): Name {
7664
return this.perm_name
7765
}

0 commit comments

Comments
 (0)
Please sign in to comment.