@@ -94,6 +94,9 @@ const Account: FC<Props> = ({ accountAddress }) => {
9494 </ div >
9595 }
9696 >
97+
98+ // Correct balance display for un-migrated V7 slow wallets:
99+ // 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
97100 < div className = "grid grid-cols-12 gap-4" >
98101 { data . account . balance !== null && (
99102 < div className = "col-span-12 md:col-span-3 mt-5 gap-5" >
@@ -103,7 +106,11 @@ const Account: FC<Props> = ({ accountAddress }) => {
103106 </ dt >
104107 < dd className = "mt-1 md:text-2xl font-semibold tracking-tight text-gray-900" >
105108 { account . slowWallet ? (
106- < LibraAmount > { new Decimal ( account . slowWallet . unlocked ) } </ LibraAmount >
109+ account . initialized ? (
110+ < LibraAmount > { new Decimal ( account . slowWallet . unlocked ) } </ LibraAmount >
111+ ) : (
112+ < LibraAmount > { new Decimal ( 0 ) } </ LibraAmount >
113+ )
107114 ) : (
108115 < LibraAmount > { new Decimal ( data . account . balance ) } </ LibraAmount >
109116 ) }
@@ -116,11 +123,17 @@ const Account: FC<Props> = ({ accountAddress }) => {
116123 < div className = "overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6" >
117124 < dt className = "truncate text-sm font-medium text-gray-500" > Locked</ dt >
118125 < dd className = "mt-1 text-3xl font-semibold tracking-tight text-gray-900" >
126+ { account . initialized ? (
119127 < LibraAmount >
120- { new Decimal ( data . account . balance ) . minus (
121- new Decimal ( account . slowWallet . unlocked ) ,
122- ) }
123- </ LibraAmount >
128+ { new Decimal ( data . account . balance ) . minus (
129+ new Decimal ( account . slowWallet . unlocked ) ,
130+ ) }
131+ </ LibraAmount >
132+ ) : (
133+ < LibraAmount > { new Decimal ( data . account . balance ) } </ LibraAmount >
134+ )
135+
136+ }
124137 </ dd >
125138 </ div >
126139 </ div >
0 commit comments