Skip to content

Commit

Permalink
Fix @jsonArrayMember issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Comp0te committed Jan 11, 2025
1 parent 73055af commit 3eefa88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/rpc/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ export class RpcAddressableEntity {
@jsonMember({ name: 'entity', constructor: RpcAddressableEntity })
entity: RpcAddressableEntity;

@jsonMember({ name: 'named_keys', constructor: NamedKey })
@jsonArrayMember(NamedKey, { name: 'named_keys' })
namedKeys: NamedKey[];

@jsonMember({ name: 'entry_points', constructor: EntryPointValue })
@jsonArrayMember(EntryPointValue, { name: 'entry_points' })
entryPoints?: EntryPointValue[];
}

Expand Down
4 changes: 2 additions & 2 deletions src/types/key/EntryPointAddr.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { jsonArrayMember, jsonMember, jsonObject } from 'typedjson';
import { jsonMember, jsonObject } from 'typedjson';
import { concat } from '@ethersproject/bytes';

import { EntityAddr } from './EntityAddr';
Expand Down Expand Up @@ -57,7 +57,7 @@ class VmCasperV1 {
})
entityAddr: EntityAddr;

@jsonArrayMember(Uint8Array, { name: 'NameBytes' })
@jsonMember(Uint8Array, { name: 'NameBytes' })
nameBytes: Uint8Array;

constructor(entityAddr: EntityAddr, nameBytes: Uint8Array) {
Expand Down
4 changes: 2 additions & 2 deletions src/types/key/URef.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { jsonObject, jsonMember, jsonArrayMember } from 'typedjson';
import { jsonObject, jsonMember } from 'typedjson';
import { IResultWithBytes } from '../clvalue';
import { Conversions } from '../Conversions';
import { concat } from '@ethersproject/bytes';
Expand Down Expand Up @@ -34,7 +34,7 @@ export const ByteHashLen = 32;
@jsonObject
export class URef {
/** The unique data (hash) associated with the URef, represented as a 32-byte array. */
@jsonArrayMember(Number)
@jsonMember(Uint8Array)
data: Uint8Array;

/** The access permissions assigned to this URef, defined by the `UrefAccess` enum. */
Expand Down

0 comments on commit 3eefa88

Please sign in to comment.