diff --git a/.env.example b/.env.example index 316c048d..6ab31983 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,6 @@ APP_NAME=OBE # default network CHAIN_NAME=telos-testnet -# enable sidebar to switch chains -#SHOW_SIDEBAR=true +# enable selector on header to switch chains +#SHOW_MULTICHAIN_SELECTOR=true diff --git a/package.json b/package.json index 88fdf85c..b272aff7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "open-block-explorer", - "version": "1.2.2", + "version": "1.2.3", "description": "..", "productName": "Telos Block Explorer", "author": "DonaldPeat ", diff --git a/public/chains/eos/eos.png b/public/chains/eos/eos.png index 2550424b..0440d78f 100644 Binary files a/public/chains/eos/eos.png and b/public/chains/eos/eos.png differ diff --git a/public/chains/eos/eos_large.png b/public/chains/eos/eos_large.png index 16a18e0a..1fb715f6 100644 Binary files a/public/chains/eos/eos_large.png and b/public/chains/eos/eos_large.png differ diff --git a/public/chains/eos/favicon.png b/public/chains/eos/favicon.png index 2550424b..0440d78f 100644 Binary files a/public/chains/eos/favicon.png and b/public/chains/eos/favicon.png differ diff --git a/public/chains/jungle/eos.png b/public/chains/jungle/eos.png index 2550424b..0440d78f 100644 Binary files a/public/chains/jungle/eos.png and b/public/chains/jungle/eos.png differ diff --git a/public/chains/jungle/eos_large.png b/public/chains/jungle/eos_large.png index 16a18e0a..1fb715f6 100644 Binary files a/public/chains/jungle/eos_large.png and b/public/chains/jungle/eos_large.png differ diff --git a/public/chains/jungle/favicon.png b/public/chains/jungle/favicon.png index 2550424b..0440d78f 100644 Binary files a/public/chains/jungle/favicon.png and b/public/chains/jungle/favicon.png differ diff --git a/public/chains/ux/favicon.png b/public/chains/ux/favicon.png index 0dfda988..62161332 100644 Binary files a/public/chains/ux/favicon.png and b/public/chains/ux/favicon.png differ diff --git a/public/chains/ux/logo_lg.png b/public/chains/ux/logo_lg.png deleted file mode 100644 index f1a8358c..00000000 Binary files a/public/chains/ux/logo_lg.png and /dev/null differ diff --git a/public/chains/ux/logo_sm.jpeg b/public/chains/ux/logo_sm.jpeg deleted file mode 100644 index 0dfda988..00000000 Binary files a/public/chains/ux/logo_sm.jpeg and /dev/null differ diff --git a/public/chains/ux/logo_sm.png b/public/chains/ux/logo_sm.png new file mode 100644 index 00000000..62161332 Binary files /dev/null and b/public/chains/ux/logo_sm.png differ diff --git a/public/chains/ux/logo_sm.svg b/public/chains/ux/logo_sm.svg deleted file mode 100644 index deb25ad1..00000000 --- a/public/chains/ux/logo_sm.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/boot/ual.ts b/src/boot/ual.ts index feb11567..8a2c0b43 100644 --- a/src/boot/ual.ts +++ b/src/boot/ual.ts @@ -147,12 +147,14 @@ function getMainChain() { const authenticators: Authenticator[] = []; export const getAuthenticators = () => { + // we initialize the authenticators inside this function on demand if (authenticators.length === 0) { - // we initialize the authenticators inside this function on demand + // UAL is not looking at the chain when checking the localstorage for an already logged in account + // A quick fix is to add the chain in appName until we move forward with WharfKit const mainChain = getMainChain(); - authenticators.push(new Anchor([mainChain], { appName: process.env.APP_NAME })), + authenticators.push(new Anchor([mainChain], { appName: `${process.env.APP_NAME}_${mainChain.chainId}` })), authenticators.push(new CleosAuthenticator([mainChain], { - appName: process.env.APP_NAME, + appName: `${process.env.APP_NAME}_${mainChain.chainId}`, loginHandler, signHandler: signHandlerForMainChain, })); diff --git a/src/components/AccountCard.vue b/src/components/AccountCard.vue index adf633c7..04b31522 100644 --- a/src/components/AccountCard.vue +++ b/src/components/AccountCard.vue @@ -140,10 +140,9 @@ export default defineComponent({ }; const loadBalances = async () => { - const { staked, profits } = await getRexBalance(); + const total = await getRexBalance(); rexDeposits.value = await getRexFund(); - rexStaked.value = staked; - rexProfits.value = profits; + rexStaked.value = total; }; const loadResources = () => { @@ -254,14 +253,11 @@ export default defineComponent({ const rexBal = ((await api.getTableRows(paramsrexbal)) as RexbalRows) .rows[0]; + const totalRexBalance = rexBal?.rex_balance ? Number(rexBal.rex_balance.split(' ')[0]) : 0; - const staked = - rexBal?.vote_stake - ? Number(rexBal.vote_stake.split(' ')[0]) - : 0; const paramsrexpool = { code: 'eosio', @@ -279,12 +275,7 @@ export default defineComponent({ const tlosRexRatio = totalRex > 0 ? totalLendable / totalRex : 1; const total = totalRex > 0 ? tlosRexRatio * totalRexBalance : 0.0; - const profits = total - staked; - return { - total, - profits, - staked, - }; + return total; }; const fixDec = (val: number): number => parseFloat(val.toFixed(3)); @@ -349,7 +340,6 @@ export default defineComponent({ totalTokens.value = '--'; stakedResources.value = delegatedByOthers.value = 0; rexStaked.value = 0; - rexProfits.value = 0; rexDeposits.value = 0; }; @@ -395,7 +385,6 @@ export default defineComponent({ totalValueString, rex, rexStaked, - rexProfits, rexDeposits, none, system_account, @@ -560,10 +549,6 @@ export default defineComponent({ REX staked (includes savings) {{ formatAsset(rexStaked) }} - - REX profits - {{ formatAsset(rexProfits) }} - REX liquid deposits {{ formatAsset(rexDeposits) }} diff --git a/src/components/ChainsSidebar.vue b/src/components/ChainsMenu.vue similarity index 59% rename from src/components/ChainsSidebar.vue rename to src/components/ChainsMenu.vue index 54b3d8a8..2ee774f2 100644 --- a/src/components/ChainsSidebar.vue +++ b/src/components/ChainsMenu.vue @@ -1,13 +1,20 @@ diff --git a/src/components/HeaderSearch.vue b/src/components/HeaderSearch.vue index 51cf34d4..fda8e414 100644 --- a/src/components/HeaderSearch.vue +++ b/src/components/HeaderSearch.vue @@ -253,7 +253,7 @@ export default defineComponent({ diff --git a/src/pages/Account.vue b/src/pages/Account.vue index b105a519..05f27d88 100644 --- a/src/pages/Account.vue +++ b/src/pages/Account.vue @@ -54,7 +54,7 @@ export default defineComponent({