From 0175c4f466ca6e07522e556d816026e27bd082bd Mon Sep 17 00:00:00 2001
From: CJ42 <cavallerajean@gmail.com>
Date: Tue, 30 Apr 2024 08:23:05 +0100
Subject: [PATCH] chore: fix biome linting errors

---
 src/lib/schemaParser.test.ts |  6 +++---
 src/lib/schemaParser.ts      | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/lib/schemaParser.test.ts b/src/lib/schemaParser.test.ts
index 9ad23144..8340b89a 100644
--- a/src/lib/schemaParser.test.ts
+++ b/src/lib/schemaParser.test.ts
@@ -136,7 +136,7 @@ describe('schemaParser getSchema', () => {
     it('finds known SomeBytes32Mapping:<bytes32>', () => {
       const bytes32Value =
         '1111222233334444555566667777888899990000aaaabbbbccccddddeeeeffff';
-      const name = `SomeBytes32Mapping:<bytes32>`;
+      const name = 'SomeBytes32Mapping:<bytes32>';
       const dynamicName = `SomeBytes32Mapping:0x${bytes32Value}`;
       const key = `0x0cfc51aec37c55a4d0b10000${bytes32Value.slice(0, 42)}`;
 
@@ -157,7 +157,7 @@ describe('schemaParser getSchema', () => {
 
     it('finds known SomeSelectorMap:<bytes4>', () => {
       const bytes4Value = 'beefbeef';
-      const name = `SomeSelectorMap:<bytes4>`;
+      const name = 'SomeSelectorMap:<bytes4>';
       const dynamicName = `SomeSelectorMap:0x${bytes4Value}`;
       const key = `0x0cfc51aec37c55a4d0b10000${bytes4Value}00000000000000000000000000000000`;
 
@@ -180,7 +180,7 @@ describe('schemaParser getSchema', () => {
   describe('MappingWithGrouping', () => {
     it('finds MappingWithGrouping', () => {
       const address = 'af3bf2ffb025098b79caddfbdd113b3681817744';
-      const name = `AddressPermissions:Permissions:<address>`;
+      const name = 'AddressPermissions:Permissions:<address>';
       const dynamicName = `AddressPermissions:Permissions:0x${address}`;
       const key = `0x4b80742de2bf82acb3630000${address}`;
       const schema = getSchema(key);
diff --git a/src/lib/schemaParser.ts b/src/lib/schemaParser.ts
index c8b2dff7..bb38f3db 100644
--- a/src/lib/schemaParser.ts
+++ b/src/lib/schemaParser.ts
@@ -125,8 +125,9 @@ const findMappingSchemaForKey = (
   // replace dynamic placeholder in the map part (e.g: <address>, <bytes32>) with the hex value
   if (isDynamicKeyName(keySchema.name)) {
     dynamicPartName = secondWordHex;
-    result['dynamicName'] = `${keyNameParts[0]}:0x${dynamicPartName}`;
-    result['dynamicKeyPart'] = `0x${secondWordHex}`;
+    (result as DynamicNameSchema).dynamicName =
+      `${keyNameParts[0]}:0x${dynamicPartName}`;
+    (result as DynamicNameSchema).dynamicKeyPart = `0x${secondWordHex}`;
   }
 
   // if first 20 bytes of the hash of second word in schema match,
@@ -153,10 +154,9 @@ const findMappingWithGroupingSchemaForKey = (
     const dynamicKeyPart = key.substring(26);
 
     if (isDynamicKeyName(keySchema.name)) {
-      keySchema[
-        'dynamicName'
-      ] = `${keyNameParts[0]}:${keyNameParts[1]}:0x${dynamicKeyPart}`;
-      keySchema['dynamicKeyPart'] = `0x${dynamicKeyPart}`;
+      (keySchema as DynamicNameSchema).dynamicName =
+        `${keyNameParts[0]}:${keyNameParts[1]}:0x${dynamicKeyPart}`;
+      (keySchema as DynamicNameSchema).dynamicKeyPart = `0x${dynamicKeyPart}`;
     }
 
     return {