Skip to content

Commit

Permalink
Lockdrop logic removed (#954)
Browse files Browse the repository at this point in the history
* Lockdrop logic removed

* more lockdrop removed (#957)

* fix: fetch dApps staking data after changing accounts (#955)

* fix: fetch staked dapps data for EVM wallets

* fix: clean up

* fix: position for page column

* Account unification (#925)

* Unification service skeleton

* Started with unify account implementation

* Unifiy account implemented - not working

* It works

* Error handling

* Mapped accounts getter functions

* Set identity logic (#931)

* Create and update identity

* Update identity works

* NFT metadata fetch

* Account unification batch call

* Comment

* Native asset transfer support for unified accounts (#938)

* Native token transfer

* Use unified SS50 for dApps staking

* getIdentity fix

* Update NFT repo to use Token API endpoints

* Update test call

* feat: added AccountUnification modal (#935)

* feat: added AccountUnification modal

* Add UI modals for account unification

* refactor: ModalConnectWallet

* Remove the wallet connect section on the user account modal

* Add type

* Add NFT select modal

* Add unify accounts icon button on the asset page

* Add dark theme, replace tailwind css to pure css

* remove body tag from style

* Replace rem to px

* Add styles for mobile screens

* Add static texts

* Adjust styles

* Update help

* feat: implemented logic in the ‘account unification’ modal (#936)

* feat: load the evm account from metamask

* feat: checks the staking info

* refactor: clean up

* feat: added close modal in step 2

* feat: removed account name input

* rollback: account name

* feat: added XC20 tokens which are required to transfer to unified account

* feat: updated 'accountName' logic

* feat: added jazzicon in Step 3

* adjust class naming rule

* clean up

* test: refactor useAccountUnification.ts

* fix: allow AU on local node

* test: refactor useAccountUnification.ts (2)

* test: refactor useAccountUnification.ts (3)

* Fix media query

* Use i18n

* Add help texts using i18n

---------

Co-authored-by: Ayumi Takahashi <ayumee528@gmail.com>

* Fix for reading staking data from UA (#942)

* Fix for reading staking data from UA

* Removed unnecessary store read

* Account unification call refactoring

* Adjust the checkbox position

* UA logic integration (#943)

* Basic integration implemented

* Disable submit button on action

* Rename from Step to AuStep

* use i18n

* add the emojis to i18 file

* feat: transfer XC20 tokens to the unified SS58 account (#944)

* feat: transfer XC20 tokens to unified SS58 account

* feat: transfer XC20 tokens to unified SS58 account (2)

* feat: added XCM tokens on shibuya

* feat: added XCM tokens on shibuya (2)

* refactor: clean up

* fix: updated receiving faucet account

* Accounts - show UA name and modal (#948)

* fix: account unification modals (#953)

* fix: connect MetaMask after users click connect button

* fix: updated words

* feat: added a check input for sending submit transaction

* fix: words

* fix: getMappedNativeAddress and getMappedEvmAddress functions

* Fix for breaking changes on Shibuya (#958)

* Moonfit added (#937) (#939)

* Uplift to the latest Quasar version (#940)

* feat: updated XCM with equilibrium to V3 (#946)

* fix: let space wrap and height grow for cards in banner (#947)

* let space wrap and height grow

* minimum width added, aligned bottom

* Remove lockdrop (#951)

* hotfix: update the hotfix branch (#920)

* fix: rollback

* fix: update ci yml files

* Lockdrop switch removed

* Removed toggleEvmWalletSchema

---------

Co-authored-by: impelcrypto <92044428+impelcrypto@users.noreply.github.com>

* fix: fetch dApps staking data after changing accounts (#955)

* fix: fetch staked dapps data for EVM wallets

* fix: clean up

* fix: position for page column

* Methods naming fix top match the latest runtime upgrade

---------

Co-authored-by: impelcrypto <92044428+impelcrypto@users.noreply.github.com>
Co-authored-by: Gregory Luneau <greg@astar.network>

* Display unification costs (#959)

* Display unification costs

* Limit account length

* fix: updated sending ERC20 tokens logic and displaying the destination balance for EVM address (considering deducting staked amount)

* fix: odd space issue

* Display and edit unified account (#963)

* Display unified account details

* Edit unified account

* Cleanup

* Update src/components/header/modals/account-unification/AuStep3.vue

Co-authored-by: impelcrypto <92044428+impelcrypto@users.noreply.github.com>

---------

Co-authored-by: impelcrypto <92044428+impelcrypto@users.noreply.github.com>

---------

Co-authored-by: impelcrypto <impelcrypto@gmail.com>
Co-authored-by: impelcrypto <92044428+impelcrypto@users.noreply.github.com>
Co-authored-by: Ayumi Takahashi <ayumee528@gmail.com>
Co-authored-by: Gregory Luneau <greg@astar.network>

* Fix for provider not set or invalid error (#970)

* Fix for provider not set or invalid error

* Don't use gas station on Shibuya

* fix: disabled transaction speed ui for Shibuya EVM (#971)

---------

Co-authored-by: impelcrypto <92044428+impelcrypto@users.noreply.github.com>

---------

Co-authored-by: Gregory Luneau <greg@astar.network>
Co-authored-by: impelcrypto <92044428+impelcrypto@users.noreply.github.com>
Co-authored-by: impelcrypto <impelcrypto@gmail.com>
Co-authored-by: Ayumi Takahashi <ayumee528@gmail.com>
  • Loading branch information
5 people committed Oct 13, 2023
1 parent 070877a commit 372fe9b
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 235 deletions.
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 @@ -89,11 +77,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 @@ -111,14 +94,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 @@ -134,8 +115,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,
Expand Down Expand Up @@ -173,10 +152,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 @@ -225,7 +200,6 @@ export default defineComponent({
async () => {
const apiRef = $api;
if (!isEthWallet.value) {
isLockdropAccount.value = false;
return;
}
if (
Expand All @@ -240,14 +214,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 @@ -263,16 +231,13 @@ export default defineComponent({
isH160,
isEthWallet,
balUsd,
isLockdropAccount,
isSkeleton,
totalBal,
ETHEREUM_EXTENSION,
multisig,
supportWalletObj,
signatoryIconWallet,
isModalLockdropWarning,
isAccountUnification,
handleModalLockdropWarning,
getShortenAddress,
copyAddress,
showAccountUnificationModal,
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 @@ -94,7 +94,6 @@ export default {
staking: 'Staking',
contract: 'Contract',
ecosystem: 'Ecosystem',
plasmLockdrop: 'Plasm Lockdrop',
closeSidebar: 'Close sidebar',
twitter: 'Twitter',
telegram: 'Telegram',
Expand Down Expand Up @@ -439,7 +438,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 @@ -459,8 +457,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 @@ -561,16 +557,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

0 comments on commit 372fe9b

Please sign in to comment.