Skip to content

Commit 2476bd0

Browse files
foufrixScottyPoi
andauthored
Update packages/cli/src/rpc/util.ts
check only AccetCode in UInt8toBoolenArray Co-authored-by: Scotty <66335769+ScottyPoi@users.noreply.github.com>
1 parent 6ba3931 commit 2476bd0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

packages/cli/src/rpc/util.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,8 @@ export function bitToBooleanArray(resBitArray: BitArray, contentKeysLength: numb
5050
export function Uint8toBooleanArray(res: Uint8Array, contentKeysLength: number): { success: boolean[] } {
5151
const successArray = new Array(contentKeysLength).fill(false)
5252
for (let i = 0; i < contentKeysLength; i++) {
53-
const byteIndex = Math.floor(i / 8)
54-
const bitIndex = i % 8
55-
const byte = res[byteIndex]
5653
if (byte !== undefined) {
57-
successArray[i] = ((byte >> bitIndex) & 1) === 1
54+
successArray[i] = AcceptCode.ACCEPT
5855
}
5956
}
6057
return { success: successArray }

0 commit comments

Comments
 (0)