From c5fd9be32181a1b679341c88d4042f471be5a728 Mon Sep 17 00:00:00 2001 From: Aaron Cox Date: Tue, 29 Aug 2023 23:25:36 -0700 Subject: [PATCH] Stop the mutation of the `object` parameter --- src/chain/action.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chain/action.ts b/src/chain/action.ts index abc1de79..104c7a98 100644 --- a/src/chain/action.ts +++ b/src/chain/action.ts @@ -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