From 94a59e17d22606cdbe547802fe70c98798f5958d Mon Sep 17 00:00:00 2001 From: David McFadzean Date: Sun, 22 Oct 2023 14:03:13 -0400 Subject: [PATCH] Let all users attempt to Buy --- frontend/src/AssetView.js | 2 +- frontend/src/TokenTrader.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/AssetView.js b/frontend/src/AssetView.js index f633903..9634205 100644 --- a/frontend/src/AssetView.js +++ b/frontend/src/AssetView.js @@ -78,7 +78,7 @@ const AssetView = ({ navigate }) => { > {isToken && } - {isToken && isAuthenticated && !isDeleted && } + {isToken && !isDeleted && } {isOwner && !isToken && } {isOwner && !isToken && !isDeleted && } {isOwner && !isDeleted && } diff --git a/frontend/src/TokenTrader.js b/frontend/src/TokenTrader.js index 1cb2bdb..d2b11da 100644 --- a/frontend/src/TokenTrader.js +++ b/frontend/src/TokenTrader.js @@ -166,6 +166,11 @@ const TokenTrader = ({ metadata, setRefreshKey }) => { } } catch (error) { console.error('Error:', error); + + if (error.response.status === 401) { + alert("You have to login first"); + return; + } } };