diff --git a/src/App.vue b/src/App.vue index 77425f72..dae73b04 100644 --- a/src/App.vue +++ b/src/App.vue @@ -93,15 +93,14 @@ export default { // TODO } - // TODO reenable - // if (query.address) { - // await this.$store.dispatch('connectDefaultWallet', query); - // delete query.address; - // delete query.networkId; - // this.$router.replace({ query }); - // } else if (this.wallet && this.address) { - // await this.$store.dispatch('connectWallet', { info: this.wallet }); - // } + if (query.address) { + await this.$store.dispatch('connectDefaultWallet', query); + delete query.address; + delete query.networkId; + this.$router.replace({ query }); + } else if (this.wallet && this.address) { + await this.$store.dispatch('connectWallet', { info: this.wallet }); + } if ( this.$isMobile && !query.address && diff --git a/src/components/TokenAmountDetails.vue b/src/components/TokenAmountDetails.vue index 00532003..d9b28f22 100644 --- a/src/components/TokenAmountDetails.vue +++ b/src/components/TokenAmountDetails.vue @@ -63,6 +63,7 @@ export default { } } + .token-icon :deep(svg), .token-icon :deep(img) { width: 20px; height: 20px; diff --git a/src/components/TokenSelector/TokenImportCard.vue b/src/components/TokenSelector/TokenImportCard.vue index f9cb7d09..b1be269d 100644 --- a/src/components/TokenSelector/TokenImportCard.vue +++ b/src/components/TokenSelector/TokenImportCard.vue @@ -56,6 +56,11 @@ export default { @use '../../styles/variables.scss'; @use '../../styles/typography.scss'; +svg, +img { + display: inline-block; +} + .token-import-card { border-top: 1px solid variables.$color-black; padding: 28px 14px; diff --git a/src/lib/utils.js b/src/lib/utils.js index a357835e..c2c84d4b 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -217,7 +217,7 @@ export const detectAndModifyWAE = (token) => { // find the wrapped ae token and modify it on any network const waeAddresses = DEFAULT_NETWORKS.map((network) => network.waeAddress); if (waeAddresses.includes(token.address)) { - return { ...token, symbol: 'AE', decimals: 18 }; + return { ...token, symbol: 'AE', decimals: 18, name: 'Aeternity', isAe: true }; } return token; }; diff --git a/src/store/index.js b/src/store/index.js index 06874c8d..83dab3aa 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,22 +1,22 @@ import { shallowRef } from 'vue'; import { createStore } from 'vuex'; import { - Node, + AeSdk, AeSdkAepp, - walletDetector, BrowserWindowMessageConnection, - AeSdk, - unpackTx, + Node, RpcRejectedByUserError, + unpackTx, + walletDetector, } from '@aeternity/aepp-sdk'; import createPersistedState from 'vuex-persistedstate'; import { - handleUnknownError, - findErrorExplanation, createDeepLinkUrl, - resolveWithTimeout, - isSafariBrowser, + findErrorExplanation, + handleUnknownError, isDexBackendDisabled, + isSafariBrowser, + resolveWithTimeout, } from '@/lib/utils'; import { DEFAULT_NETWORKS, IN_FRAME, IS_MOBILE } from '@/lib/constants'; import aeternityModule from './modules/aeternity'; @@ -217,12 +217,11 @@ export default createStore({ 'Login with your wallet has failed. Please make sure that you are logged into your wallet.', dismissText: 'Open My Wallet', resolve: () => { - const addressDeepLink = createDeepLinkUrl({ + window.location = createDeepLinkUrl({ type: 'address', 'x-success': `${window.location.href.split('?')[0]}?address={address}&networkId={networkId}`, 'x-cancel': window.location.href.split('?')[0], }); - window.location = addressDeepLink; }, }); } else { diff --git a/src/styles/globals.scss b/src/styles/globals.scss index 5150adcc..fca7ccff 100644 --- a/src/styles/globals.scss +++ b/src/styles/globals.scss @@ -23,6 +23,10 @@ body { background-color: variables.$color-black2; } +svg { + display: inline-block; +} + @include mixins.laptop { #app { padding-bottom: 80px; diff --git a/src/views/SwapView.vue b/src/views/SwapView.vue index cfea9b1f..3e58bbab 100644 --- a/src/views/SwapView.vue +++ b/src/views/SwapView.vue @@ -316,6 +316,10 @@ export default { background-color: variables.$color-black2; border: 4px solid variables.$color-black3; + svg { + display: block; + } + &:hover { opacity: 0.8; } diff --git a/src/views/TokenDetailView.vue b/src/views/TokenDetailView.vue index abceb036..15d5e6c7 100644 --- a/src/views/TokenDetailView.vue +++ b/src/views/TokenDetailView.vue @@ -193,9 +193,6 @@ export default defineComponent({ token1: this.pairMap.get(tx.pairAddress).token1, })); }, - pairList() { - return [...this.pairMap.values()]; - }, supply() { return formatAmountPretty(this.metaInfo.event_supply, this.metaInfo.decimals); }, @@ -258,7 +255,16 @@ export default defineComponent({ this.tokenId = this.$route.params.id; const metaInfo = await this.$store.dispatch('tokens/fetchToken', this.tokenId); - this.metaInfo = detectAndModifyWAE(metaInfo); + this.metaInfo = detectAndModifyWAE({ + ...metaInfo, + address: this.tokenId, + }); + if (this.metaInfo.isAe) { + this.metaInfo = { + ...this.metaInfo, + event_supply: 0, // + }; + } this.pairs = await this.$store.dispatch('backend/fetchPairsByToken', this.tokenId); this.pairMap = new Map([ @@ -296,7 +302,6 @@ export default defineComponent({ tokenAddress: this.tokenId, }); this.loading = false; - // TODO fetch the tokens pairs from the new pair endpoint }, methods: { shortenAddress,