Fix problem with accounts
This commit is contained in:
@@ -112,7 +112,7 @@ const DebugStream = () => {
|
|||||||
// Filter out account_info and account_objects requests
|
// Filter out account_info and account_objects requests
|
||||||
try {
|
try {
|
||||||
const parsed = JSON.parse(log.jsonData);
|
const parsed = JSON.parse(log.jsonData);
|
||||||
if (parsed.id.includes("hooks-builder-req")) {
|
if (parsed?.id?._Request?.includes("hooks-builder-req")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export const addFaucetAccount = async (showToast: boolean = false) => {
|
|||||||
sequence: 1,
|
sequence: 1,
|
||||||
hooks: [],
|
hooks: [],
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
version: '2'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export const deleteHook = async (account: IAccount & { name?: string }) => {
|
|||||||
Account: account.address,
|
Account: account.address,
|
||||||
TransactionType: "SetHook",
|
TransactionType: "SetHook",
|
||||||
Sequence: account.sequence,
|
Sequence: account.sequence,
|
||||||
Fee: "100000",
|
Fee: "1000000",
|
||||||
Hooks: [
|
Hooks: [
|
||||||
{
|
{
|
||||||
Hook: {
|
Hook: {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export interface IAccount {
|
|||||||
sequence: number;
|
sequence: number;
|
||||||
hooks: string[];
|
hooks: string[];
|
||||||
isLoading: boolean;
|
isLoading: boolean;
|
||||||
|
version?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ILog {
|
export interface ILog {
|
||||||
@@ -119,6 +120,8 @@ if (typeof window !== "undefined") {
|
|||||||
if (localStorageAccounts) {
|
if (localStorageAccounts) {
|
||||||
initialAccounts = JSON.parse(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
|
// Initialize state
|
||||||
|
|||||||
Reference in New Issue
Block a user