Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MyLand refresh/navigation fix #333

Merged
merged 21 commits into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}]`);
pcowgill marked this conversation as resolved.
Show resolved Hide resolved
};

_getAssetsFromBlockchain = async address => {
Expand Down