Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lockdrop logic removed #954

Merged
merged 6 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ export default defineComponent({

// Handle wallet change so we can inject proper wallet
watch([isEthWallet, currentWallet, isH160, currentAccountName], () => {
// Todo: delete after we remove the lockdrop service
const isLockdropAccount = !isH160.value && currentAccountName.value === ETHEREUM_EXTENSION;
setCurrentWallet(isEthWallet.value, currentWallet.value, isLockdropAccount);
setCurrentWallet(isEthWallet.value, currentWallet.value);
});

const removeSplashScreen = () => {
Expand Down
35 changes: 0 additions & 35 deletions src/components/assets/Account.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<template>
<div class="wrapper--account">
<div v-if="isLockdropAccount && !isH160" class="container--lockdrop-warning">
<div>
<span class="text--warning-bold">{{ $t('assets.inLockdropAccount') }}</span>
</div>
<ul class="row--warning-list">
<li class="text--warning">
{{ $t('assets.cantTransferToExcahges') }}
</li>
<li class="text--warning">{{ $t('assets.noHash') }}</li>
</ul>
</div>

<div class="container">
<div class="row--details">
<div class="column-account-name">
Expand Down Expand Up @@ -72,11 +60,6 @@
</div>
<native-asset-list v-if="!isH160" />
</div>
<modal-lockdrop-warning
v-if="isLockdropAccount && !isH160"
:is-modal="isModalLockdropWarning"
:handle-modal="handleModalLockdropWarning"
/>
</div>
</template>
<script lang="ts">
Expand All @@ -94,14 +77,12 @@ import { computed, defineComponent, ref, watch, watchEffect } from 'vue';
import { useI18n } from 'vue-i18n';
import NativeAssetList from 'src/components/assets/NativeAssetList.vue';
import EvmNativeToken from 'src/components/assets/EvmNativeToken.vue';
import ModalLockdropWarning from 'src/components/assets/modals/ModalLockdropWarning.vue';
import { ETHEREUM_EXTENSION } from 'src/hooks';
import { supportWalletObj } from 'src/config/wallets';

export default defineComponent({
components: {
NativeAssetList,
ModalLockdropWarning,
EvmNativeToken,
},
props: {
Expand All @@ -117,8 +98,6 @@ export default defineComponent({
setup(props) {
const balUsd = ref<number | null>(null);
const isCheckingSignature = ref<boolean>(false);
const isLockdropAccount = ref<boolean>(false);
const isModalLockdropWarning = ref<boolean>(true);
const { currentAccount, currentAccountName, multisig } = useAccount();
const { balance, isLoadingBalance } = useBalance(currentAccount);
const { nativeTokenUsd } = usePrice();
Expand Down Expand Up @@ -150,10 +129,6 @@ export default defineComponent({
return multisig.value ? supportWalletObj[multisig.value.signatory.source].img : '';
});

const handleModalLockdropWarning = ({ isOpen }: { isOpen: boolean }) => {
isModalLockdropWarning.value = isOpen;
};

const copyAddress = () => {
copy(currentAccount.value);
store.dispatch('general/showAlertMsg', {
Expand Down Expand Up @@ -202,7 +177,6 @@ export default defineComponent({
async () => {
const apiRef = $api;
if (!isEthWallet.value) {
isLockdropAccount.value = false;
return;
}
if (
Expand All @@ -217,14 +191,8 @@ export default defineComponent({
const ss58 = getEvmMappedSs58Address(currentAccount.value);
if (!ss58) return;
const { data } = await apiRef.query.system.account<FrameSystemAccountInfo>(ss58);
if (Number(data.free.toString()) > 0) {
isLockdropAccount.value = true;
} else {
isLockdropAccount.value = false;
}
} catch (error: any) {
console.error(error.message);
isLockdropAccount.value = false;
}
},
{ immediate: false }
Expand All @@ -240,15 +208,12 @@ export default defineComponent({
isH160,
isEthWallet,
balUsd,
isLockdropAccount,
isSkeleton,
totalBal,
ETHEREUM_EXTENSION,
multisig,
supportWalletObj,
signatoryIconWallet,
isModalLockdropWarning,
handleModalLockdropWarning,
getShortenAddress,
copyAddress,
};
Expand Down
78 changes: 0 additions & 78 deletions src/components/assets/modals/ModalLockdropWarning.vue

This file was deleted.

6 changes: 0 additions & 6 deletions src/components/assets/styles/account.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@
cursor: pointer;
}

.container--lockdrop-warning {
background: $warning-yellow;
border-radius: 6px;
padding: 16px 24px;
}

.text--warning-bold {
color: $navy-1;
font-weight: 700;
Expand Down
65 changes: 0 additions & 65 deletions src/components/assets/styles/modal-lockdrop-warning.scss

This file was deleted.

6 changes: 3 additions & 3 deletions src/config/chainEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const providerEndpoints: ChainProvider[] = [
info: 'Smart contract platform for decentralized applications (dapps) on the Polkadot network',
endpoints: [
{ name: 'Astar', endpoint: 'wss://rpc.astar.network' },
// { name: 'Dwellir', endpoint: 'wss://astar-rpc.dwellir.com' },
{ name: 'Dwellir', endpoint: 'wss://astar-rpc.dwellir.com' },
{ name: 'Blast', endpoint: 'wss://astar.public.blastapi.io' },
{ name: 'OnFinality', endpoint: 'wss://astar.api.onfinality.io/public-ws' },
{ name: 'RadiumBlock', endpoint: 'wss://astar.public.curie.radiumblock.co/ws' },
Expand Down Expand Up @@ -68,7 +68,7 @@ export const providerEndpoints: ChainProvider[] = [
info: 'Smart contract platform for decentralized applications (dapps) on the Kusama network',
endpoints: [
{ name: 'Shiden', endpoint: 'wss://rpc.shiden.astar.network' },
// { name: 'Dwellir', endpoint: 'wss://shiden-rpc.dwellir.com' },
{ name: 'Dwellir', endpoint: 'wss://shiden-rpc.dwellir.com' },
{ name: 'Blast', endpoint: 'wss://shiden.public.blastapi.io' },
{ name: 'OnFinality', endpoint: 'wss://shiden.api.onfinality.io/public-ws' },
{ name: 'Light Client (experimental)', endpoint: 'light://substrate-connect/kusama/shiden' },
Expand Down Expand Up @@ -96,7 +96,7 @@ export const providerEndpoints: ChainProvider[] = [
info: 'The test network of the layer 2 scaling blockchain',
endpoints: [
{ name: 'Shibuya', endpoint: 'wss://rpc.shibuya.astar.network' },
// { name: 'Dwellir', endpoint: 'wss://shibuya-rpc.dwellir.com' },
{ name: 'Dwellir', endpoint: 'wss://shibuya-rpc.dwellir.com' },
{ name: 'Blast', endpoint: 'wss://shibuya.public.blastapi.io/' },
{ name: 'Light Client (experimental)', endpoint: 'light://substrate-connect/tokyo/shibuya' },
],
Expand Down
14 changes: 0 additions & 14 deletions src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ export default {
staking: 'Staking',
contract: 'Contract',
ecosystem: 'Ecosystem',
plasmLockdrop: 'Plasm Lockdrop',
closeSidebar: 'Close sidebar',
twitter: 'Twitter',
telegram: 'Telegram',
Expand Down Expand Up @@ -380,7 +379,6 @@ export default {
xvmAssets: 'XVM (Cross Virtual Machine) ERC-20 Assets',
nativeAccount: 'Native Account',
evmAccount: 'EVM Account',
switchToNative: 'Switch to Lockdrop',
switchToEvm: 'Switch to EVM',
totalBalance: 'Total Balance',
transfer: 'Transfer',
Expand All @@ -399,8 +397,6 @@ export default {
yourEvmDeposit: 'Your EVM deposit',
yourVestingInfo: 'Your Vesting Info',
yourStaking: 'Your Staking',
lockdropAccount: 'Lockdrop Account',
inLockdropAccount: 'You are in a Lockdrop account',
cantTransferToExcahges: "You can't transfer to Exchanges",
noHash: 'Your transaction will not have a hash',
addToWallet: 'Add to wallet',
Expand Down Expand Up @@ -501,16 +497,6 @@ export default {
tooltip:
'We keep {amount} {symbol} in origin chain account to avoid losing the funds. When depositing from origin chain, only tokens that are above the minimum balance are transferable.',
},
lockdropWarning: {
message:
'The Lockdrop account will be deprecated in the upcoming update, as its purpose has been fulfilled. Please transfer your funds to another substrate wallet immediately.',
list1:
"Please transfer your funds from this account by the specified date. Retrieval won't be possible after that.",
list2:
'Please note that unstaking in dApp staking will require 10 eras (approximately 10 days).',
closeTime: 'UTC 23:59 12th September 2023',
gotIt: 'Got it',
},
},
},
dashboard: {
Expand Down
4 changes: 0 additions & 4 deletions src/i18n/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export default {
dappStaking: 'dApp Staking',
staking: 'Mise en jeu',
contract: 'Contrat',
plasmLockdrop: 'Plasm Lockdrop',
closeSidebar: 'Fermer la barre latérale',
twitter: 'Twitter',
telegram: 'Telegram',
Expand Down Expand Up @@ -317,7 +316,6 @@ export default {
xvmAssets: 'Actifs XVM ERC20',
nativeAccount: 'Compte natif',
evmAccount: 'Compte EVM',
switchToNative: 'Basculer vers le Lockdrop',
switchToEvm: 'Basculer vers EVM',
totalBalance: 'Solde total',
transfer: 'Transférer',
Expand All @@ -333,8 +331,6 @@ export default {
yourEvmDeposit: 'Votre dépôt EVM',
yourVestingInfo: 'Vos informations de Vesting',
yourStaking: 'Votre mise en jeu',
lockdropAccount: 'Compte de Lockdrop',
inLockdropAccount: 'Vous vous trouvez sur un compte Lockdrop',
cantTransferToExcahges: 'Vous ne pouvez pas transférer vers des exchanges',
noHash: "Votre transaction n'aura pas de hash",
addToWallet: 'Ajouter au portefeuille',
Expand Down
5 changes: 1 addition & 4 deletions src/i18n/it/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export default {
dappStaking: 'dApp Staking',
staking: 'Staking',
contract: 'Contratto',
plasmLockdrop: 'Plasm Lockdrop',
closeSidebar: 'Chiudi barra laterale',
twitter: 'Twitter',
telegram: 'Telegram',
Expand Down Expand Up @@ -313,7 +312,7 @@ export default {
xvmAssets: 'Asset XVM ERC20',
nativeAccount: 'Account Nativo',
evmAccount: 'Account EVM',
switchToNative: 'Passa al Lockdrop',

switchToEvm: 'Passa a EVM',
totalBalance: 'Bilancio Totale',
transfer: 'Trasferisci',
Expand All @@ -329,8 +328,6 @@ export default {
yourEvmDeposit: 'Il tuo deposito EVM',
yourVestingInfo: 'Informazioni Vesting',
yourStaking: 'Il tuo Staking',
lockdropAccount: 'Account Lockdrop',
inLockdropAccount: 'Sei in un account Lockdrop',
cantTransferToExcahges: 'Non puoi trasferire agli Exchange',
noHash: 'La tua transazione non avrà un hash',
addToWallet: 'Aggiungi al wallet',
Expand Down
Loading
Loading