forked from polkadot-js/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…olkadot-js#292) * fix: Fixes polkadot-js#290. Toggles Address Add/Edit menu correctly * fix: Rename to hasNoAddresses
- Loading branch information
Showing
5 changed files
with
64 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2017-2018 @polkadot/app-accounts authors & contributors | ||
// This software may be modified and distributed under the terms | ||
// of the ISC license. See the LICENSE file for details. | ||
|
||
let addressesQty: (addressAll?: Array<any>) => number; | ||
|
||
let hasAddresses: (addressAll?: Array<any>) => boolean; | ||
|
||
let hasNoAddresses: (addressAll?: Array<any>) => boolean; | ||
|
||
addressesQty = (addressAll?: Array<any>): number => | ||
hasAddresses(addressAll) && addressAll ? Object.keys(addressAll).length : 0; | ||
|
||
hasAddresses = (addressAll?: Array<any>): boolean => | ||
!hasNoAddresses(addressAll); | ||
|
||
hasNoAddresses = (addressAll?: Array<any>): boolean => | ||
!addressAll || !Object.keys(addressAll).length; | ||
|
||
export { | ||
addressesQty, | ||
hasAddresses, | ||
hasNoAddresses | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters