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

merge 'release-hotfix' to the main branch #1010

Merged
merged 4 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
Binary file added src/assets/img/ic_neurolanche.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/assets/Assets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</div>
<div v-else class="container--assets">
<!-- Memo: hide xvm panel because AA might replace it -->
<!-- <xvm-native-asset-list v-if="isSupportXvmTransfer" :xvm-assets="xvmAssets.xvmAssets" /> -->
<!-- <xvm-native-asset-list v-if="isSupportAuTransfer" :xvm-assets="xvmAssets.xvmAssets" /> -->
<xcm-native-asset-list v-if="isEnableXcm" :xcm-assets="xcmAssets.assets" />
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/assets/NativeAssetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export default defineComponent({
const { balance, accountData, isLoadingBalance } = useBalance(selectedAddress);
const { numEvmDeposit } = useEvmDeposit();
const { nativeTokenUsd } = usePrice();
const { currentNetworkName, nativeTokenSymbol, isSupportXvmTransfer } = useNetworkInfo();
const { currentNetworkName, nativeTokenSymbol, isSupportAuTransfer } = useNetworkInfo();

const xcmNativeToken = computed(() => generateAstarNativeTokenObject(nativeTokenSymbol.value));

Expand Down Expand Up @@ -379,7 +379,7 @@ export default defineComponent({
isLoading,
Path,
isSkeleton,
isSupportXvmTransfer,
isSupportAuTransfer,
isExpand,
isBalloonNativeToken,
isBalloonNativeTokenClosing,
Expand Down
24 changes: 20 additions & 4 deletions src/components/assets/transfer/LocalTransfer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,23 @@
{{ $t('warning.warning') }}
</span>
</div>
<div class="text--warn">
{{ $t('assets.modals.notDestIsLedgerAccount') }}
</div>
<ul class="column--warnings">
<li>
<span>
{{ $t('assets.modals.notSendToExchanges') }}
</span>
</li>
<li v-if="!isSupportAuTransfer">
<span>
{{ $t('assets.modals.cannotBeSentErc20', { network: currentNetworkName }) }}
</span>
</li>
<li>
<span>
{{ $t('assets.modals.understandWarning') }}
</span>
</li>
</ul>
</span>
</label>
</div>
Expand Down Expand Up @@ -214,7 +228,7 @@ export default defineComponent({
setup(props) {
const { iconWallet } = useWalletIcon();
const { currentAccount, currentAccountName, multisig } = useAccount();
const { nativeTokenSymbol } = useNetworkInfo();
const { nativeTokenSymbol, currentNetworkName, isSupportAuTransfer } = useNetworkInfo();
const t = computed<Asset>(() => props.token);
const {
selectedTip,
Expand Down Expand Up @@ -273,6 +287,8 @@ export default defineComponent({
isTransferNativeToken,
isNativeToEvm,
multisig,
currentNetworkName,
isSupportAuTransfer,
isValidEvmAddress,
setSelectedGas,
setSelectedTip,
Expand Down
12 changes: 7 additions & 5 deletions src/components/assets/transfer/styles/local-transfer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,6 @@
font-weight: 700;
}

.text--warn {
padding-left: 10px;
line-height: 20px;
}

.text--title-evm-warning {
font-weight: 700;
font-size: 14px;
Expand All @@ -317,6 +312,13 @@
color: $warning-red;
}

.column--warnings {
display: flex;
flex-direction: column;
list-style-type: disc;
margin-left: 18px;
}

.body--dark {
.box--input-field {
background: transparent;
Expand Down
2 changes: 2 additions & 0 deletions src/components/dapp-staking/my-staking/DynamicAdsArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export default defineComponent({
}
} else if (index === 1) {
return require('/src/assets/img/ic_algem_staking.svg');
} else if (index === 2) {
return require('/src/assets/img/ic_neurolanche.png');
} else {
return img;
}
Expand Down
12 changes: 2 additions & 10 deletions src/components/header/modals/ModalConnectWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
<button
v-for="(wallet, index) in nativeWallets"
:key="index"
:disabled="checkIsDisabledWallet(wallet.source) || isZkEvm"
:disabled="isZkEvm"
class="box__row--wallet box--hover--active"
:class="currentWallet === wallet.source && 'border--active'"
@click="!checkIsDisabledWallet(wallet.source) && setSubstrateWalletModal(wallet.source)"
@click="setSubstrateWalletModal(wallet.source)"
>
<div class="box--img">
<img :src="wallet.img" />
Expand Down Expand Up @@ -224,13 +224,6 @@ 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) => {
Expand Down Expand Up @@ -327,7 +320,6 @@ export default defineComponent({
setEvmWalletModal,
disconnectAccount,
setPolkasafeModal,
checkIsDisabledWallet,
setAccountUnificationModal,
currentNetworkIdx,
endpointKey,
Expand Down
8 changes: 8 additions & 0 deletions src/data/featured_dapp.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,13 @@
"subtitle": "dApp Staking is available on EVM",
"link": "https://app.algem.io/liquid-staking",
"gradient": ["#dcac45", "#0f0a40"]
},
{
"img": "",
"category": "Stake & Earn 'Rewarding' NFT",
"title": "Neurolanche",
"subtitle": "Join our staking and earn soulbound 'rewarding' NFT",
"link": "https://app.algem.io/liquid-staking",
"gradient": ["#FF9999", "#0F0A40"]
}
]
6 changes: 3 additions & 3 deletions src/hooks/transfer/useTokenTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function useTokenTransfer(selectedToken: Ref<Asset>) {
const route = useRoute();
const router = useRouter();

const { nativeTokenSymbol, evmNetworkIdx, isSupportXvmTransfer, isZkEvm } = useNetworkInfo();
const { nativeTokenSymbol, evmNetworkIdx, isSupportAuTransfer, isZkEvm } = useNetworkInfo();
const isH160 = computed<boolean>(() => store.getters['general/isH160Formatted']);
const tokenSymbol = computed<string>(() => route.query.token as string);
const isLoading = computed<boolean>(() => store.getters['general/isLoading']);
Expand Down Expand Up @@ -96,7 +96,7 @@ export function useTokenTransfer(selectedToken: Ref<Asset>) {

const isValidDestAddress = computed<boolean>(() => {
const isOnlyAcceptEvmAddress =
isH160.value && !isTransferNativeToken.value && !isSupportXvmTransfer.value;
isH160.value && !isTransferNativeToken.value && !isSupportAuTransfer.value;
return isOnlyAcceptEvmAddress
? isValidEvmAddress(toAddress.value)
: isValidAddressPolkadotAddress(toAddress.value, ASTAR_SS58_FORMAT) ||
Expand All @@ -106,7 +106,6 @@ export function useTokenTransfer(selectedToken: Ref<Asset>) {

const inputHandler = (event: any): void => {
transferAmt.value = event.target.value;
errMsg.value = '';
};

const resetStates = (): void => {
Expand Down Expand Up @@ -141,6 +140,7 @@ export function useTokenTransfer(selectedToken: Ref<Asset>) {
});
} else if (toAddress.value && !isValidDestAddress.value) {
errMsg.value = 'warning.inputtedInvalidDestAddress';
return;
} else if (
isH160.value &&
toAddress.value &&
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useNetworkInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function useNetworkInfo() {
return chainInfo ? chainInfo.tokenSymbol : '';
});

const isSupportXvmTransfer = computed<boolean>(() => {
const isSupportAuTransfer = computed<boolean>(() => {
return !isMainnet.value && !isZkEvm.value;
});

Expand All @@ -102,7 +102,7 @@ export function useNetworkInfo() {
evmNetworkIdx,
currentNetworkName,
nativeTokenSymbol,
isSupportXvmTransfer,
isSupportAuTransfer,
polkadotJsLink,
isZkEvm,
networkNameSubstrate,
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,11 @@ export default {
max: 'Max',
balance: 'Balance: {amount} {token}',
available: 'Available: {amount} {token}',
cannotBeSentErc20: 'ERC20 tokens cannot be sent to {network} Native addresses',
notSendToExchanges: 'I’m NOT sending tokens to Exchanges',
notSendToEvmExchanges:
"I’m NOT sending tokens to Exchange's EVM deposit addresses. I understand that if I do so, the funds will likely be lost.",
understandWarning: 'I understand the following. If don’t, I will lose my funds.',
understandWarning: 'I understand that if I do so, the funds will likely be lost',
notDestIsLedgerAccount:
'The destination address is neither a ledger native account nor an exchange address. I understand that if I do so, the funds will likely be lost.',
notDestIsExchangeAddress: 'Destination address is not an Exchange address',
Expand Down
4 changes: 2 additions & 2 deletions src/modules/xcm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export let xcmChainObj: XcmChainObj = {
img: require('/src/assets/img/chain/polkadot.png'),
parachainId: relaychainParaId,
endpoints: [
'wss://polkadot.api.onfinality.io/public-ws',
'wss://rpc.polkadot.io',
'wss://polkadot.api.onfinality.io/public-ws',
'wss://1rpc.io/dot',
'wss://polkadot-public-rpc.blockops.network/ws',
'wss://polkadot-rpc.dwellir.com',
Expand Down Expand Up @@ -291,8 +291,8 @@ export let xcmChainObj: XcmChainObj = {
img: require('/src/assets/img/token/pha.png'),
parachainId: parachainIds.PHALA,
endpoints: [
'wss://phala-rpc.dwellir.com',
'wss://api.phala.network/ws',
'wss://phala-rpc.dwellir.com',
'wss://phala.api.onfinality.io/public-ws',
],
subscan: 'https://phala.subscan.io',
Expand Down
2 changes: 1 addition & 1 deletion src/v2/repositories/implementations/XcmRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class XcmRepository implements IXcmRepository {
return await this.buildTxCall(
from,
endpoint,
'xtokens',
'xTokens',
'transferMultiasset',
assets,
destination,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class AstarXcmRepository extends XcmRepository {
return await this.buildTxCall(
from,
endpoint,
'xtokens',
'xTokens',
'transferMultiasset',
assets,
destination,
Expand Down
13 changes: 4 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6080,15 +6080,10 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001426, caniuse-lite@^1.0.30001503:
version "1.0.30001517"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz#90fabae294215c3495807eb24fc809e11dc2f0a8"
integrity sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==

caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001280:
version "1.0.30001282"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001282.tgz#38c781ee0a90ccfe1fe7fefd00e43f5ffdcb96fd"
integrity sha512-YhF/hG6nqBEllymSIjLtR2iWDDnChvhnVJqp+vloyt2tEHFG1yBR+ac2B/rOw0qOK0m0lEXU2dv4E/sMk5P9Kg==
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001280, caniuse-lite@^1.0.30001426, caniuse-lite@^1.0.30001503:
version "1.0.30001561"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001561.tgz"
integrity sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==

canvas-renderer@~2.2.0:
version "2.2.1"
Expand Down
Loading