Fix problem with accounts
This commit is contained in:
@@ -59,6 +59,7 @@ export const addFaucetAccount = async (showToast: boolean = false) => {
|
||||
sequence: 1,
|
||||
hooks: [],
|
||||
isLoading: false,
|
||||
version: '2'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user