Skip to content

Commit 514cdf7

Browse files
authored
update sign message (#6)
* update sign message * small improvement
1 parent aa9d3b0 commit 514cdf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export class MinaApp extends BaseApp {
228228
message: "Missing or wrong arguments",
229229
};
230230
}
231+
231232
if (memo && memo.length > 32) {
232233
return {
233234
signature: null,
@@ -240,6 +241,7 @@ export class MinaApp extends BaseApp {
240241
signature: null,
241242
returnCode: "-4",
242243
message: "Fee too small",
244+
243245
};
244246
}
245247

@@ -365,7 +367,7 @@ export class MinaApp extends BaseApp {
365367

366368
// Validate remaining buffer length against message length
367369
if (response.length() < messageLength) {
368-
throw new Error("Response buffer too short for message");
370+
throw new Error(`Response buffer too short for message: expected ${messageLength} bytes but only ${response.length()} remaining`);
369371
}
370372

371373
// Finally read the message

0 commit comments

Comments
 (0)