mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-08 00:47:24 +00:00
debug: show decrypt errors on screen for troubleshooting
This commit is contained in:
@@ -54,10 +54,14 @@ export async function getInbox(
|
||||
const messaging = (api.query as any).messaging;
|
||||
if (!messaging?.inbox) return [];
|
||||
const result = await messaging.inbox(era, address);
|
||||
console.log('[PEZMessage] raw inbox result:', JSON.stringify(result.toHuman?.() ?? result));
|
||||
if (result.isEmpty || result.length === 0) return [];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
return result.map((msg: Record<string, any>) => ({
|
||||
return result.map((msg: Record<string, any>) => {
|
||||
console.log('[PEZMessage] msg keys:', Object.keys(msg.toJSON?.() ?? msg));
|
||||
return msg;
|
||||
}).map((msg: Record<string, any>) => ({
|
||||
sender: msg.sender.toString(),
|
||||
blockNumber: msg.blockNumber?.toNumber?.() ?? msg.block_number?.toNumber?.() ?? 0,
|
||||
ephemeralPublicKey: hexToBytes(
|
||||
|
||||
Reference in New Issue
Block a user