Skip to content

RangeError: Invalid string length #23

Closed
@rvslan

Description

@rvslan

I got error:
RangeError: Invalid string length at utf8DecodeBytes (node:internal/deps/undici/undici:6441:27) at packageData (node:internal/deps/undici/undici:6403:29) at specConsumeBody (node:internal/deps/undici/undici:6381:14) at processTicksAndRejections (node:internal/process/task_queues:95:5)

maybe is because i modified code functionality to read private key as json so now my constructor is that:
`const key = Uint8Array.from(JSON.parse(WALLET_PRIVATE_KEY));

this.connection = new Connection(RPC_URL
  , { commitment: 'confirmed' })
this.wallet = new Wallet(Keypair.fromSecretKey(key))`

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions