From 7087895e895ec703f68aa0aab056dc152901fbbf Mon Sep 17 00:00:00 2001 From: Mikhail Petrov Date: Mon, 15 Apr 2024 18:34:36 +0300 Subject: [PATCH] web: Highlight autodetection OneGate wallet closes #190 Signed-off-by: Mikhail Petrov --- src/App.css | 6 ++++++ src/App.js | 3 ++- src/Home.js | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/App.css b/src/App.css index fbc1b21..d54f352 100644 --- a/src/App.css +++ b/src/App.css @@ -205,6 +205,12 @@ ul { right: 15px; } +.btn_connect_wallet span { + color: #00e599; + position: absolute; + right: 15px; +} + .box { border-radius: 0; } diff --git a/src/App.js b/src/App.js index 53849be..2c51784 100644 --- a/src/App.js +++ b/src/App.js @@ -756,7 +756,7 @@ export const App = () => { wcSdk.setSession(session); } } catch (error) { - onModal('failed', 'Failed to connect to the wallet, please try again'); + onModal('failed', type === 'onegate' ? 'OneGate connection works only if you open the page from OneGate explorer' : 'Failed to connect to the wallet, please try again'); } } @@ -1836,6 +1836,7 @@ export const App = () => { path="/" element={} /> diff --git a/src/Home.js b/src/Home.js index a22739a..0d26d89 100644 --- a/src/Home.js +++ b/src/Home.js @@ -12,6 +12,7 @@ import { const Home = ({ onModal, onConnectWallet, + dapi, }) => { return ( @@ -61,7 +62,11 @@ const Home = ({ onClick={() => onConnectWallet('onegate')} > Onegate - onegate logo + {dapi ? ( + Connect + ) : ( + onegate logo + )} onModal('installWallet')}>I don't have a wallet