diff --git a/app/src/components/LoadingContainer.js b/app/src/components/LoadingContainer.js
index eb7bcf2..a8b8764 100644
--- a/app/src/components/LoadingContainer.js
+++ b/app/src/components/LoadingContainer.js
@@ -30,11 +30,9 @@ class LoadingContainer extends Component {
return(
-
-
-
We can't find any Ethereum accounts!
-
Please make sure that MetaMask is unlocked.
-
+
+
We can't find any Ethereum accounts!
+
Please make sure that MetaMask is unlocked.
)
@@ -44,13 +42,11 @@ class LoadingContainer extends Component {
return(
-
-
-
Initializing contracts...
-
If this takes too long please make sure they are deployed to the network
- and you are connected to the correct one.
-
-
+
+
Initializing contracts...
+
If this takes too long please make sure they are deployed to the network
+ and you are connected to the correct one.
+
)
@@ -60,24 +56,23 @@ class LoadingContainer extends Component {
return(
-
-
-
Initializing IPFS...
-
+
+
Initializing IPFS...
)
}
if (!this.props.orbitReady) {
+ const message = process.env.NODE_ENV ==='development' ?
+ "If needed, please sign the transaction in MetaMask to create the databases." :
+ "Please sign the transaction in MetaMask to create the databases.";
return(
-
-
-
Preparing OrbitDB...
-
Please sign the transaction in MetaMask to create the databases.
-
+
+
Preparing OrbitDB...
+
{message}
)
@@ -89,10 +84,8 @@ class LoadingContainer extends Component {
return(
-
-
-
Loading dapp...
-
+
+
Loading dapp...
)
diff --git a/app/src/components/NewPost.js b/app/src/components/NewPost.js
index faccb24..7bccf0a 100644
--- a/app/src/components/NewPost.js
+++ b/app/src/components/NewPost.js
@@ -92,8 +92,7 @@ class NewPost extends Component {
-#
- {postIndex}
+ #{postIndex}
@@ -111,18 +110,13 @@ class NewPost extends Component {
{username}
- {previewEnabled
- &&
- }
+ {previewEnabled && }
- {previewEnabled
- && (`Subject: ${
- postSubjectInput}`)
- }
+ {previewEnabled && (`Subject: ${postSubjectInput}`)}
diff --git a/app/src/helpers/EpochTimeConverter.js b/app/src/helpers/EpochTimeConverter.js
index a3a338d..6983095 100644
--- a/app/src/helpers/EpochTimeConverter.js
+++ b/app/src/helpers/EpochTimeConverter.js
@@ -5,7 +5,7 @@ const epochTimeConverter = (timestamp) => {
timestampDate.getMonth() + 1}/${
timestampDate.getFullYear()}, ${
timestampDate.getHours()}:${
- timestampDate.getMinutes()}:${
+ ("0"+timestampDate.getMinutes()).slice(-2)}:${
timestampDate.getSeconds()}`);
};
diff --git a/app/src/redux/sagas/drizzleUtilsSaga.js b/app/src/redux/sagas/drizzleUtilsSaga.js
index e0a708d..7ba1e80 100644
--- a/app/src/redux/sagas/drizzleUtilsSaga.js
+++ b/app/src/redux/sagas/drizzleUtilsSaga.js
@@ -20,7 +20,6 @@ function* init() {
const host = "http://127.0.0.1:8545"; //Ganache development blockchain
const fallbackProvider = new Web3.providers.HttpProvider(host);
web3 = yield call(getWeb3, { fallbackProvider });
-
forumContract = yield call(getContractInstance, { web3, artifact: Forum });
initFlag = true;
yield put({
@@ -40,7 +39,6 @@ function* init() {
// If the method below proves to be problematic/ineffective (i.e. getting current account
// from state), consider getting it from @drizzle-utils/get-accounts instead
-// with (yield call(getAccounts, {web3}))[0];
function* getCurrentAccount() {
return (yield select(accounts))[0];
}
diff --git a/app/src/redux/sagas/orbitSaga.js b/app/src/redux/sagas/orbitSaga.js
index 841f80c..58bf87a 100644
--- a/app/src/redux/sagas/orbitSaga.js
+++ b/app/src/redux/sagas/orbitSaga.js
@@ -100,7 +100,8 @@ function* orbitSaga() {
]);
yield takeLatest(ACCOUNT_CHANGED, getOrbitDBInfo);
yield takeEvery(ADD_PEER_DATABASE, addPeerDatabase);
- yield takeEvery(ACCOUNTS_FETCHED, updatePeersState);
+ if(process.env.NODE_ENV==='development')
+ yield takeEvery(ACCOUNTS_FETCHED, updatePeersState);
}
export default orbitSaga;