Skip to content

Commit

Permalink
use parseInt instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Manavian committed Jul 13, 2023
1 parent c7a6ed0 commit 42f84d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/abi-coder/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function concatWithDynamicData(items: ReadonlyArray<BytesLike>): Uint8Arr
const dynamicData = (item as Uint8ArrayWithDynamicData).dynamicData;
if (dynamicData) {
Object.entries(dynamicData).forEach(([pointerIndex, vData]) => {
topLevelData[~~pointerIndex + totalIndex] = vData;
topLevelData[parseInt(pointerIndex, 10) + totalIndex] = vData;
});
}

Expand Down Expand Up @@ -75,7 +75,7 @@ export function unpackDynamicData(
let updatedResults = results;
Object.entries(results.dynamicData).forEach(([pointerIndex, vData]) => {
// update value of pointer
const pointerOffset = ~~pointerIndex * WORD_SIZE;
const pointerOffset = parseInt(pointerIndex, 10) * WORD_SIZE;
const adjustedValue = new U64Coder().encode(
dataOffset + baseOffset + cumulativeDynamicByteLength
);
Expand Down

0 comments on commit 42f84d2

Please sign in to comment.