Skip to content

Commit

Permalink
Flow fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vsubhuman committed Jul 20, 2021
1 parent a0b391d commit 7197f9d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Expand Up @@ -370,7 +370,7 @@ export class RemoteFetcher implements IFetcher {
}

getTokenInfo: TokenInfoRequest => Promise<TokenInfoResponse> = async (body) => {
const { TokenInfoService } = body?.network?.Backend;
const { TokenInfoService } = body.network.Backend;
if (TokenInfoService == null) return {};
const promises = body.tokenIds.map(id => axios(
`${TokenInfoService}/metadata/${id}`,
Expand Down
Expand Up @@ -1941,7 +1941,7 @@ export async function genCardanoAssetMap(
existingDbRows.filter(
// only tokens with lastUpdateAt are considered existing, except for default
// asset rows, because they are never updated from network
row => row.Metadata.lastUpdatedAt || row.IsDefault
row => (row.Metadata.lastUpdatedAt != null) || row.IsDefault
).map(row => row.Identifier)
);

Expand Down
Expand Up @@ -1495,10 +1495,10 @@ async function rawAddErgoAssets(

const databaseInsert: Array<TokenUpsert> = Object.keys(tokenInfo).map(tokenId => {
const numberOfDecimals: number = tokenInfo[tokenId].numDecimals || 0;
const description: string | null = tokenInfo[tokenId].desc || null;
const description: string | null = tokenInfo[tokenId].desc;
const boxId: string = tokenInfo[tokenId].boxId;
const height: number = tokenInfo[tokenId].height;
const longName: string | null = tokenInfo[tokenId].name || null;
const longName: string | null = tokenInfo[tokenId].name;
return ({
NetworkId: network.NetworkId,
Identifier: tokenId,
Expand Down
Expand Up @@ -78,6 +78,7 @@ export default class NavWalletDetails extends Component<Props> {
showDetails !== null &&
showDetails === true
);
const showEyeIconSafe = showEyeIcon != null && showEyeIcon;
return (
<div className={styles.wrapper}>
<div className={styles.outerWrapper}>
Expand Down Expand Up @@ -123,7 +124,7 @@ export default class NavWalletDetails extends Component<Props> {
</div>
)}
</div>
{totalAmount != null && showEyeIcon &&
{totalAmount != null && showEyeIconSafe &&
<button
type="button"
className={styles.toggleButton}
Expand Down

0 comments on commit 7197f9d

Please sign in to comment.