Vesting appear logic (try #3) (#3087)

This commit is contained in:
Jaco Greeff 2020-06-29 06:40:51 +02:00 committed by GitHub
parent cafed86002
commit 3d4a903fdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,8 +94,8 @@ function Account ({ account: { address, meta }, className = '', filter, isFavori
useEffect((): void => {
if (balancesAll) {
setBalance(address, balancesAll.freeBalance);
setVestingTx(() =>
balancesAll.vestingLocked.isZero() && api.api.tx.vesting?.vest
api.api.tx.vesting?.vest && setVestingTx(() =>
balancesAll.vestingLocked.isZero()
? null
: api.api.tx.vesting.vest()
);