Skip to content

Commit

Permalink
Merge pull request #3484 from Emurgo/ruslan/warn-fixes
Browse files Browse the repository at this point in the history
warn fixes
  • Loading branch information
vsubhuman committed Apr 29, 2024
2 parents ef377ca + ffd47bb commit 18b844e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 72 deletions.

This file was deleted.

This file was deleted.

11 changes: 5 additions & 6 deletions packages/yoroi-extension/app/utils/nftMetadata.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@flow
import { isArray } from 'util';

import type {
CardanoAssetMintMetadata,
Expand Down Expand Up @@ -41,7 +40,7 @@ export function find721metadata(
}
if (
typeof asset.image === 'string' || (
isArray(asset.image) && asset.image.every(i => typeof i === 'string')
Array.isArray(asset.image) && asset.image.every(i => typeof i === 'string')
)
) {
ret.image = asset.image;
Expand All @@ -51,19 +50,19 @@ export function find721metadata(
}
if (
typeof asset.description === 'string' || (
isArray(asset.description) && asset.description.every(i => typeof i === 'string')
Array.isArray(asset.description) && asset.description.every(i => typeof i === 'string')
)
) {
ret.description = asset.description;
}
if (
isArray(asset.files) &&
Array.isArray(asset.files) &&
asset.files.every(({ name, mediaType, src }) => (
typeof name === 'string' &&
typeof mediaType === 'string' &&
(
typeof src === 'string' ||
(isArray(src) && src.every(s => typeof s === 'string'))
(Array.isArray(src) && src.every(s => typeof s === 'string'))
)
))
) {
Expand Down Expand Up @@ -97,7 +96,7 @@ export function getImageFromTokenMetadata(
return nftMetadata.image;
}
if (
isArray(nftMetadata.image) &&
Array.isArray(nftMetadata.image) &&
nftMetadata.image.every(s => typeof s === 'string')
) {
return nftMetadata.image.join('');
Expand Down
4 changes: 3 additions & 1 deletion packages/yoroi-extension/ledger/stores/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import { SUPPORTED_LOCALS } from '../i18n/translations';
import type { URLParams } from '../types/cmn';
import type { TransportIdType } from '../types/enum';
import { TRANSPORT_ID } from '../types/enum';
import { version as appVersion } from '../../package.json';
import packageInfo from '../../package.json';

const appVersion = packageInfo.version;

/**
* This is the RootStore, RootStore is responsible for creating all store
Expand Down
1 change: 1 addition & 0 deletions packages/yoroi-extension/webpack-mv2/commonConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ const optimization = {
const resolve = () /*: * */ => ({
extensions: ['*', '.js', '.wasm'],
fallback: {
vm: false,
fs: false,
path: require.resolve('path-browserify'),
stream: require.resolve('stream-browserify'),
Expand Down
1 change: 1 addition & 0 deletions packages/yoroi-extension/webpack/commonConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ const optimization = {
const resolve = () /*: * */ => ({
extensions: ['*', '.js', '.wasm'],
fallback: {
vm: false,
fs: false,
path: require.resolve('path-browserify'),
stream: require.resolve('stream-browserify'),
Expand Down

0 comments on commit 18b844e

Please sign in to comment.