Skip to content

Commit

Permalink
Review request
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelomorgado committed Apr 23, 2019
1 parent b196afa commit edb4520
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion decentraland/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
"plugin:jest/recommended",
],
rules: {
"no-console": ["error", { allow: ["warn", "error"] }],
"no-console": ["error", { allow: ["warn", "error", "info"] }],
"react-native/no-raw-text": ["error", { skip: ["LargeText"] }],
"react/prop-types": ["error", { ignore: ["navigation"] }],
"prettier/prettier": "error",
Expand Down
5 changes: 5 additions & 0 deletions decentraland/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ export const showFatalError = msg => console.error(msg);
export const showError = msg => showToast(`ERROR: ${msg}`);
export const showWarn = msg => showToast(`WARN: ${msg}`);
export const showInfo = msg => showToast(`${msg}`);

export const logInfo = msg => console.info(msg);
export const logWarn = msg => console.warn(msg);
export const logError = msg => console.error(msg);

export const checkBlockchain = async () => {
loadConfig();
Expand Down Expand Up @@ -258,7 +261,9 @@ export default {
showError,
showWarn,
showInfo,
logInfo,
logWarn,
logError,
fundAccountWithEthers,
fundAccountWithMana,
getContracts,
Expand Down
8 changes: 4 additions & 4 deletions decentraland/screens/MyAssetsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import PropTypes from "prop-types";
import MyAssetsList from "@presentational/MyAssetsList";
import MyAssetsListItem from "@presentational/MyAssetsListItem";
import { listsAreEqual, getContracts, logWarn } from "@helpers";
import { listsAreEqual, getContracts, logInfo } from "@helpers";
import { generateAssetFromId } from "@helpers/decentraland";
import DecentralandUtils from "tasit-sdk/dist/helpers/DecentralandUtils";
import { SUCCESSFUL } from "@constants/UserActionStatus";
Expand Down Expand Up @@ -80,15 +80,15 @@ export class MyAssetsScreen extends React.Component {
id => !fromBlockchainIds.includes(id)
);

logWarn(
logInfo(
`Account's assets from blockchain aren't the same as the ones stored on the app.`
);

if (addedIds.length > 0)
logWarn(`Some assets added to MyLandScreen. IDs: [${addedIds}]`);
logInfo(`Some assets added to MyLandScreen. IDs: [${addedIds}]`);

if (removedIds.length > 0)
logWarn(`Some assets removed from MyLandScreen. IDs: [${removedIds}]`);
logInfo(`Some assets removed from MyLandScreen. IDs: [${removedIds}]`);
};

_getAssetsFromBlockchain = async address => {
Expand Down

0 comments on commit edb4520

Please sign in to comment.