Skip to content

Commit

Permalink
fix: few minor styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodressel authored and mmpetarpeshev committed Jun 25, 2024
1 parent c29bf40 commit 6114347
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 25 deletions.
17 changes: 8 additions & 9 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
1 change: 1 addition & 0 deletions src/components/TokenAmountDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export default {
}
}
.token-icon :deep(svg),
.token-icon :deep(img) {
width: 20px;
height: 20px;
Expand Down
5 changes: 5 additions & 0 deletions src/components/TokenSelector/TokenImportCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
19 changes: 9 additions & 10 deletions src/store/index.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions src/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ body {
background-color: variables.$color-black2;
}

svg {
display: inline-block;
}

@include mixins.laptop {
#app {
padding-bottom: 80px;
Expand Down
4 changes: 4 additions & 0 deletions src/views/SwapView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ export default {
background-color: variables.$color-black2;
border: 4px solid variables.$color-black3;
svg {
display: block;
}
&:hover {
opacity: 0.8;
}
Expand Down
15 changes: 10 additions & 5 deletions src/views/TokenDetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down Expand Up @@ -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([
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6114347

Please sign in to comment.