Skip to content

Commit

Permalink
Stop the mutation of the object parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Aug 30, 2023
1 parent f63e421 commit c5fd9be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/chain/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export class Action extends Struct {
/** The ABI-encoded action data. */
@Struct.field('bytes') data!: Bytes

static from(object: ActionType | AnyAction, abi?: ABIDef): Action {
static from(anyAction: ActionType | AnyAction, abi?: ABIDef): Action {
let object = {...anyAction}
const data = object.data as any
if (!Bytes.isBytes(data)) {
let type: string | undefined
Expand Down

0 comments on commit c5fd9be

Please sign in to comment.