hyperweb-io / hyperweb-io/telescope
"Buffer is not defined " when set pagination
- Dominant language
- TypeScript
- Stars
- 154
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
```
helpers.ts:146 Uncaught (in promise) ReferenceError: Buffer is not defined
at setPaginationParams (helpers.ts:146:44)
at LCDQueryClient.validators (query.lcd.ts:41:7)
at Proxy.fetchAcitveValdiators (useStakingStore.ts:40:32)
at Proxy. (pinia.mjs:1363:30)
at store. (pinia.mjs:915:40)
at Proxy.init (useStakingStore.ts:25:18)
at Proxy. (pinia.mjs:1363:30)
at store. (pinia.mjs:915:40)
at Proxy.initial (useBlockchain.ts:102:31)
at Proxy. (pinia.mjs:1363:30)
```
```ts
if (typeof pagination?.key !== "undefined") {
// String to Uint8Array
// let uint8arr = new Uint8Array(Buffer.from(data,'base64'));
// Uint8Array to String
options.params['pagination.key'] = Buffer.from(pagination.key).toString('base64');
}
```
pagination.key should be `String` type for developer to input, currently is `UInt8Array`. not friendly
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.