diff --git a/components/DebugStream.tsx b/components/DebugStream.tsx index 50583a5..41c513f 100644 --- a/components/DebugStream.tsx +++ b/components/DebugStream.tsx @@ -112,7 +112,7 @@ const DebugStream = () => { // Filter out account_info and account_objects requests try { const parsed = JSON.parse(log.jsonData); - if (parsed.id.includes("hooks-builder-req")) { + if (parsed?.id?._Request?.includes("hooks-builder-req")) { return; } } catch (err) { diff --git a/state/actions/addFaucetAccount.ts b/state/actions/addFaucetAccount.ts index 4899a3b..91fa305 100644 --- a/state/actions/addFaucetAccount.ts +++ b/state/actions/addFaucetAccount.ts @@ -59,6 +59,7 @@ export const addFaucetAccount = async (showToast: boolean = false) => { sequence: 1, hooks: [], isLoading: false, + version: '2' }); } } diff --git a/state/actions/deployHook.ts b/state/actions/deployHook.ts index 7b7b49e..70a383a 100644 --- a/state/actions/deployHook.ts +++ b/state/actions/deployHook.ts @@ -151,7 +151,7 @@ export const deleteHook = async (account: IAccount & { name?: string }) => { Account: account.address, TransactionType: "SetHook", Sequence: account.sequence, - Fee: "100000", + Fee: "1000000", Hooks: [ { Hook: { diff --git a/state/index.ts b/state/index.ts index 4d1828f..96838e7 100644 --- a/state/index.ts +++ b/state/index.ts @@ -34,6 +34,7 @@ export interface IAccount { sequence: number; hooks: string[]; isLoading: boolean; + version?: string; } export interface ILog { @@ -119,6 +120,8 @@ if (typeof window !== "undefined") { if (localStorageAccounts) { initialAccounts = JSON.parse(localStorageAccounts); } + // filter out old accounts (they do not have version property at all) + initialAccounts = initialAccounts.filter(acc => acc.version === '2'); } // Initialize state