We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4d12bc2 + 5b3f77c commit 23734bbCopy full SHA for 23734bb
src/ext/process-response.ts
@@ -43,7 +43,21 @@ export class Response {
43
44
public decodedLog(): string | undefined {
45
const log = this.lowLvlResponse.log
46
- return log ? String.fromCharCode.apply(null, new Uint8Array(converter.decode(log))) : undefined;
+ if (log) {
47
+ const decoded = converter.decode(log)
48
+ const uintArray = new Uint8Array(decoded)
49
+ const uintArraySize = uintArray.length
50
+ const step = 10000
51
+ const result = []
52
+ // To avoid maximum call stack size excess
53
+ for (let i = 0; i < uintArraySize; i + step) {
54
+ const chunk = String.fromCharCode.apply(null, uintArray.slice(i, i + step))
55
+ result.push(chunk)
56
+ }
57
+ return result.join('')
58
+ } else {
59
+ return undefined
60
61
}
62
63
0 commit comments