![]()
@@ -224,6 +224,13 @@ export default defineComponent({
props.setCloseModal();
};
+ const checkIsDisabledWallet = (source: SupportWallet): boolean => {
+ if (source === SupportWallet.Snap && window.location.origin === productionOrigin) {
+ return true;
+ }
+ return false;
+ };
+
const nativeWallets = computed(() => {
return supportWallets
.map((it) => {
@@ -320,6 +327,7 @@ export default defineComponent({
setEvmWalletModal,
disconnectAccount,
setPolkasafeModal,
+ checkIsDisabledWallet,
setAccountUnificationModal,
currentNetworkIdx,
endpointKey,
diff --git a/src/components/sidenav/styles/sidebar-desktop.scss b/src/components/sidenav/styles/sidebar-desktop.scss
index 0bf65c9bc..df96e276b 100644
--- a/src/components/sidenav/styles/sidebar-desktop.scss
+++ b/src/components/sidenav/styles/sidebar-desktop.scss
@@ -29,6 +29,7 @@
background: linear-gradient(140deg, #070c25 50%, #253585 80%, #3e2371 90%);
display: flex;
flex-direction: column;
+ z-index: 1;
}
.sidebar--height-decentralized {
diff --git a/src/components/sidenav/styles/sidebar-mobile.scss b/src/components/sidenav/styles/sidebar-mobile.scss
index e0b7d7bd8..2799133b8 100644
--- a/src/components/sidenav/styles/sidebar-mobile.scss
+++ b/src/components/sidenav/styles/sidebar-mobile.scss
@@ -7,6 +7,8 @@
justify-content: space-between;
height: 48px;
background: $navy-2;
+ position: relative;
+ z-index: 1;
}
.tabs {
diff --git a/src/components/sidenav/styles/sidebar-option.scss b/src/components/sidenav/styles/sidebar-option.scss
index fae5fbaaf..7be137eb6 100644
--- a/src/components/sidenav/styles/sidebar-option.scss
+++ b/src/components/sidenav/styles/sidebar-option.scss
@@ -7,6 +7,8 @@
box-shadow: 0px 0px 24px 4px rgba(0, 0, 0, 0.08);
padding-top: 16px;
overflow-x: hidden;
+ position: relative;
+ z-index: 1;
}
.q-expansion-item {
diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss
index 59419e5d2..0293a68fd 100644
--- a/src/css/quasar.variables.scss
+++ b/src/css/quasar.variables.scss
@@ -17,6 +17,7 @@ $modal-item-bg-dark: #141c34;
$astar-blue: #0085ff;
$astar-blue-dark: #05b6fd;
+$astar-pink: #E6007A;
$shiden-purple: #770cff;
$shiden-purple-dark: #a67cff;
$warning-red: #ff5621;
diff --git a/src/data/ads.json b/src/data/ads.json
index 55e96a6b0..195047ac5 100644
--- a/src/data/ads.json
+++ b/src/data/ads.json
@@ -1,20 +1,20 @@
[
{
- "img": "https://firebasestorage.googleapis.com/v0/b/astarnetwork-a4924.appspot.com/o/astar-dapps%2F0x1de7c3A07918fb4BE9159703e73D6e0b0736CaBC_rIb1fUz3_400x400%20(1).jpeg?alt=media&token=3832d94b-81bd-4e12-9d8b-96d83896ed3a",
+ "img": "/images/ads/what_is_dapp_staking.webp",
"title": "What is dApp Staking",
"subtitle": "Learn our unique solution",
"link": "https://docs.astar.network/docs/build/dapp-staking/#what-is-dapp-staking"
},
{
- "img": "https://firebasestorage.googleapis.com/v0/b/astarnetwork-a4924.appspot.com/o/astar-dapps%2F0x1de7c3A07918fb4BE9159703e73D6e0b0736CaBC_rIb1fUz3_400x400%20(1).jpeg?alt=media&token=3832d94b-81bd-4e12-9d8b-96d83896ed3a",
+ "img": "/images/ads/how_to_stake.webp",
"title": "How to Stake?",
"subtitle": "Step-by-step video tutorial",
- "link": "https://www.youtube.com/watch?v=8KrUhu2rweA"
+ "link": "https://www.youtube.com/shorts/fEJsFwBGkaI"
},
{
- "img": "https://firebasestorage.googleapis.com/v0/b/astarnetwork-a4924.appspot.com/o/astar-dapps%2F0x1de7c3A07918fb4BE9159703e73D6e0b0736CaBC_rIb1fUz3_400x400%20(1).jpeg?alt=media&token=3832d94b-81bd-4e12-9d8b-96d83896ed3a",
+ "img": "https://img.youtube.com/vi/9jkM_uYrqUw/maxresdefault.jpg",
"title": "How to set up Polkadot Native Wallet",
"subtitle": "Step-by-step video tutorial",
"link": "https://www.youtube.com/watch?v=9jkM_uYrqUw"
}
-]
\ No newline at end of file
+]
diff --git a/src/data/dapp_promotions.json b/src/data/dapp_promotions.json
new file mode 100644
index 000000000..fcc6513af
--- /dev/null
+++ b/src/data/dapp_promotions.json
@@ -0,0 +1,14 @@
+[
+ {
+ "name": "Algem - Liquid Staking",
+ "shortDescription": "Receive one liquid nASTR token for every ASTR token you stake. Then use nASTR to yield farm on the ecosystem to maximize your earnings.",
+ "link": "https://www.algem.io/",
+ "img": "images/dapp_promotions/algem.jpg"
+ },
+ {
+ "name": "ASTR token, value and utility",
+ "shortDescription": "How the ASTR Token Brings Utility and Value to the Astar Ecosystem",
+ "link": "https://astar.network/blog/how-the-astr-token-brings-utility-and-value-to-the-astar-39387",
+ "img": "https://ipfs.subsocial.network/ipfs/bafybeig2o6zjlnxnwgdv6xkcgu4w5tn7wdre26kimpc2w2ldrum66cotw4"
+ }
+]
diff --git a/src/hooks/dapps-staking/useCampaign.ts b/src/hooks/dapps-staking/useCampaign.ts
new file mode 100644
index 000000000..ae2d7a12f
--- /dev/null
+++ b/src/hooks/dapps-staking/useCampaign.ts
@@ -0,0 +1,45 @@
+import { computed } from 'vue';
+import { useStore } from 'src/store';
+import { Campaign, DappCombinedInfo } from 'src/v2/models';
+import dappPromotions from 'src/data/dapp_promotions.json';
+
+export function useCampaign() {
+ const dappsInCampaign = 5;
+ const store = useStore();
+
+ // Latest registered dApps.
+ const newListings = computed
(() =>
+ (store.getters['dapps/getAllDapps'])
+ .filter((x) => !!x.dapp)
+ .sort((x, y) => Number(y.dapp?.creationTime ?? 0) - Number(x.dapp?.creationTime ?? 0))
+ .splice(0, dappsInCampaign)
+ .map(
+ (x) =>
+ {
+ name: x.dapp?.name,
+ shortDescription: x.dapp?.shortDescription,
+ link: x.dapp?.url,
+ img: x.dapp?.imagesUrl ? x.dapp.imagesUrl[0] : 'images/noimage.png',
+ address: x.contract.address,
+ }
+ )
+ );
+
+ // Combine latest dApps with dApp promotions.
+ const combinedCampaigns = computed(() => {
+ const result: Campaign[] = [];
+ const minLen = Math.min(newListings.value.length, dappPromotions.length);
+
+ for (let i = 0; i < minLen; i++) {
+ result.push(newListings.value[i], dappPromotions[i]);
+ }
+ result.push(...newListings.value.slice(minLen), ...dappPromotions.slice(minLen));
+
+ return result;
+ });
+
+ return {
+ newListings,
+ combinedCampaigns,
+ };
+}
diff --git a/src/hooks/index.ts b/src/hooks/index.ts
index 6458890b0..ea1d4b0a8 100644
--- a/src/hooks/index.ts
+++ b/src/hooks/index.ts
@@ -32,6 +32,7 @@ export * from './dapps-staking/useStakingList';
export * from './dapps-staking/useSignPayload';
export * from './dapps-staking/useDappRedirect';
export * from './dapps-staking/useDispatchGetDapps';
+export * from './dapps-staking/useCampaign';
export * from './wallet/useWalletIcon';
export * from './wallet/useEvmWallet';
export * from './wallet/useLedger';
diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts
index e16d6cd4d..23a324afa 100644
--- a/src/i18n/en-US/index.ts
+++ b/src/i18n/en-US/index.ts
@@ -289,6 +289,8 @@ export default {
ledgerSPlus: 'Ledger Nano S Plus: 6 eras',
ledgerS: 'Ledger Nano S: 2 eras',
},
+ dappsOwners: 'dApps owners! We can now help to promote your campaign. Please check',
+ dappsOwnersLink: 'the details.',
},
dappStaking: {
myStaking: 'My Staking',
@@ -386,13 +388,20 @@ export default {
githubAccount: 'GitHub account',
communityRequired: 'At least one community link is required.',
},
+ introduction: {
+ title: 'One more thing!',
+ promotionCard:
+ 'When you are listed, a promotion card will appear like this, please fill in the description within 65 characters.',
+ placeholder: 'Please add your introduction',
+ characters: '{characters} out of 65 characters',
+ },
description: 'Description',
markdown: 'Markdown',
preview: 'Preview',
addAccount: 'Add an account',
addLogo: 'Add a logo image',
addImage: 'Add an image',
- images: 'Images (maximum upload file size: {size})',
+ images: 'Images (Recommended size {ratio} within {size})',
imagesRequired: 'At least 4 images are required.',
descriptionRequired: 'Tell the world something about your dApp.',
contractTypeTitle: 'Is your project on',
diff --git a/src/pages/DappStaking.vue b/src/pages/DappStaking.vue
index 9ce258373..fc2f1a1b3 100644
--- a/src/pages/DappStaking.vue
+++ b/src/pages/DappStaking.vue
@@ -1,5 +1,6 @@
+
@@ -16,3 +17,16 @@ export default defineComponent({
},
});
+
+
diff --git a/src/store/dapp-staking/actions.ts b/src/store/dapp-staking/actions.ts
index d7d95cbfa..1b0ee8dc9 100644
--- a/src/store/dapp-staking/actions.ts
+++ b/src/store/dapp-staking/actions.ts
@@ -155,6 +155,7 @@ const actions: ActionTree
= {
images: getImagesInfo(parameters.dapp),
developers: parameters.dapp.developers,
description: parameters.dapp.description,
+ shortDescription: parameters.dapp.shortDescription,
communities: parameters.dapp.communities,
contractType: parameters.dapp.contractType,
mainCategory: parameters.dapp.mainCategory,
diff --git a/src/v2/models/DappsStaking.ts b/src/v2/models/DappsStaking.ts
index eabd5d349..2aa5e19ee 100644
--- a/src/v2/models/DappsStaking.ts
+++ b/src/v2/models/DappsStaking.ts
@@ -59,3 +59,11 @@ export interface AccountLedger {
export interface DappStakingConstants {
maxEraStakeValues: number;
}
+
+export interface Campaign {
+ name: string;
+ shortDescription: string;
+ link?: string;
+ img: string;
+ address?: string;
+}
diff --git a/src/v2/repositories/implementations/IdentityRepository.ts b/src/v2/repositories/implementations/IdentityRepository.ts
index 73c814a9a..8da1dc53a 100644
--- a/src/v2/repositories/implementations/IdentityRepository.ts
+++ b/src/v2/repositories/implementations/IdentityRepository.ts
@@ -31,6 +31,11 @@ export class IdentityRepository implements IIdentityRepository {
public async getIdentity(address: string): Promise {
Guard.ThrowIfUndefined('address', address);
const api = await this.api.getApi();
+
+ if (!api.query.identity) {
+ return undefined;
+ }
+
const result = await api.query.identity.identityOf