diff --git a/web-app/src/modules/core/routes/Account/Account.tsx b/web-app/src/modules/core/routes/Account/Account.tsx index 615b7c4b..69c7a9d8 100644 --- a/web-app/src/modules/core/routes/Account/Account.tsx +++ b/web-app/src/modules/core/routes/Account/Account.tsx @@ -94,6 +94,9 @@ const Account: FC = ({ accountAddress }) => { } > + + // Correct balance display for un-migrated V7 slow wallets: + // If it's a slow wallet and not initialized then display unlocked as zero and balance as correct, add a note that account is not initialized
{data.account.balance !== null && (
@@ -103,7 +106,11 @@ const Account: FC = ({ accountAddress }) => {
{account.slowWallet ? ( - {new Decimal(account.slowWallet.unlocked)} + account.initialized ? ( + {new Decimal(account.slowWallet.unlocked)} + ) : ( + {new Decimal(0)} + ) ) : ( {new Decimal(data.account.balance)} )} @@ -116,11 +123,17 @@ const Account: FC = ({ accountAddress }) => {
Locked
+ {account.initialized ? ( - {new Decimal(data.account.balance).minus( - new Decimal(account.slowWallet.unlocked), - )} - + {new Decimal(data.account.balance).minus( + new Decimal(account.slowWallet.unlocked), + )} + + ) : ( + {new Decimal(data.account.balance)} + ) + + }
diff --git a/web-app/src/modules/interface/Account.interface.ts b/web-app/src/modules/interface/Account.interface.ts index 70ccc34f..feaeb895 100644 --- a/web-app/src/modules/interface/Account.interface.ts +++ b/web-app/src/modules/interface/Account.interface.ts @@ -2,6 +2,7 @@ export interface IAccountInfo { account: { address: string; balance: string | null; + initialized: boolean; slowWallet: { unlocked: string; } | null;