Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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: 2 additions & 2 deletions src/i18n/en-us/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export default {
to_moonpay_text: 'By Clicking \'Next\' you will be taken to Moonpay to purchase Telos (TLOS) with card. ' +
'Do not alter the \'TO\' or \'MEMO\' field or risk losing your ' +
'funds.',
evm_deposit: 'EVM Deposit',
evm_deposit: 'Telos EVM Deposit',
deposit_1: 'Deposit your TLOS into the EVM,',
deposit_2: 'fast, free and instant.',
withdraw: 'Withdraw',
Expand Down Expand Up @@ -548,7 +548,7 @@ export default {
new_address_created: 'A new address is successfully created',
address_is_generated: 'New Deposit Address is generated successfully',
deposit_confirmed: 'New Deposit is confirmed successfully',
evm_withdraw: 'EVM Withdraw',
evm_withdraw: 'Telos EVM Withdraw',
cannot_withdraw: 'Cannot withdraw more than EVM TLOS balance: {balance}',
deposit_to_evm: 'Deposit {quantity} to the EVM',
is_withdrawn_from_evm: '{quantity} is withdrawn from the EVM',
Expand Down
66 changes: 63 additions & 3 deletions src/pages/native/BalanceInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ export default {
showDepositEVMDlg: false,
showWithdrawEVMDlg: false,
showEVMWarning: false,
showEVMBridgeWarning: true,
showEVMBridgeWarningTitle: true,
showEVMAddress: false,
showRexStakeDlg: false,
tEVMWithdrawing: false,
Expand All @@ -102,8 +104,7 @@ export default {
return this.coins
.map(
coin =>
(coin?.totalAmount === undefined ? coin.amount : coin.totalAmount) *
coin.price,
(coin?.totalAmount === undefined ? coin.amount : coin.totalAmount) * coin.price,
)
.reduce((a, b) => a + b, 0);
},
Expand Down Expand Up @@ -197,7 +198,12 @@ export default {
table: 'tokens',
});

coins.rows.forEach((token) => {
// removing all instances of any pTokens
const filtered = coins.rows.filter(
token => !token.contract_account.includes('.ptokens'),
);

filtered.forEach((token) => {
const [precision, symbol] = token.token_symbol.split(',');
const account = token.contract_account;
if (account === 'eosio.token' && symbol === 'TLOS') {
Expand Down Expand Up @@ -630,6 +636,9 @@ export default {
this.updateBalances();
window.time = Date.now() / 1000;
}, 5000);


this.showEVMBridgeWarningTitle = this.$q.screen.lt.md;
},
beforeMount() {
this.coinViewHeight =
Expand Down Expand Up @@ -750,6 +759,50 @@ export default {
</div>
</div>

<div v-if="showEVMBridgeWarning" class="q-pa-sm">
<q-banner
rounded
:inline-actions="!$q.screen.lt.md || showEVMBridgeWarningTitle"
class="bg-purple-8 text-white"
>

<template v-slot:avatar>
<q-icon
name="info"
color="white"
size="sm"
class="avatar-icon"
/>
</template>
<span
v-if="showEVMBridgeWarningTitle"
class="text-h6"
@click="showEVMBridgeWarningTitle = false"
>
Bridging your TLOS
</span>
<span v-else class="text-subtitle1">
To transfer your TLOS tokens across blockchains, first send them to the Telos EVM network
<span class="to_evm">(click on >>> EVM),</span> then connect to
<a
href="https://bridge.telos.net/bridge"
target="_blank"
class="text-white"
>bridge.telos.net</a>
to complete your transfer.
</span>

<template v-slot:action>
<q-btn
flat
round
icon="close"
@click="showEVMBridgeWarning = false"
/>
</template>
</q-banner>
</div>

<q-tabs
v-model="tab"
:value="balanceTab"
Expand Down Expand Up @@ -894,6 +947,13 @@ export default {
</template>

<style lang="scss">
.avatar-icon {
margin-top: 10px;
}
.to_evm {
font-weight: bold;
white-space: nowrap;
}
.balance-info-page-container {
width: 600px;
}
Expand Down
21 changes: 1 addition & 20 deletions src/pages/native/balance/SendConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,26 +124,7 @@ export default {
return;
}
} else if (this.networkType === 'ethereum') {
actions.push({
account: 'eosio.token',
name: 'transfer',
data: {
from: this.accountName.toLowerCase(),
to: 'xeth.ptokens',
quantity: quantityStr,
memo: this.toAddress,
},
});
} else if (this.networkType === 'ptoken') {
actions.push({
account: this.selectedCoin.account,
name: 'redeem',
data: {
sender: this.accountName.toLowerCase(),
memo: this.toAddress,
quantity: quantityStr,
},
});
console.error('Unkown network type:', this.networkType);
}
try {
const transaction = await this.$store.$api.signTransaction(
Expand Down
6 changes: 3 additions & 3 deletions src/pages/native/balance/SendToAddress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ export default {
coinpTokenNetworks() {
if (this.selectedCoin.network) {
return {
[this.selectedCoin.network]:
this.pTokenNetworks[this.tSymbol][this.selectedCoin.network],
[this.selectedCoin.network]: this.pTokenNetworks[this.tSymbol][this.selectedCoin.network],
};
}
const networks = {};
for (const key in this.pTokenNetworks[this.tSymbol]) {
networks[key] = this.pTokenNetworks[this.tSymbol][key];
}

return networks;
},
},
Expand Down Expand Up @@ -315,8 +315,8 @@ export default {
</q-item-section>
</q-item>
<q-item
v-if="networkType === 'telos'"
class="list-item listItemNotes"
:disable="networkType === 'ptoken'"
>
<q-item-section
text-white
Expand Down
22 changes: 2 additions & 20 deletions src/store/global/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,9 @@ export default () => ({
maxSpace: 140,
suggestTokens: [
{ contract: 'eosio.token', sym: 'tlos' },
{ contract: 'btc.ptokens', sym: 'pbtc' },
{ contract: 'eth.ptokens', sym: 'peth' },
{ contract: 'link.ptokens', sym: 'plink' },
{ contract: 'usdc.ptokens', sym: 'pusdc' },
{ contract: 'usdt.ptokens', sym: 'pusdt' },
{ contract: 'pnt.ptokens', sym: 'pnt' },
],
supportTokens: [
'tlos',
'pbtc',
'peth',
'plink',
'pusdc',
'pusdt',
'pnt',
'seeds',
'qbe',
'teach',
Expand All @@ -35,7 +23,6 @@ export default () => ({
'viita',
'viict',
'acorn',
'edna',
'robo',
'word',
'eosp',
Expand All @@ -49,16 +36,11 @@ export default () => ({
'btcp',
'ecoin',
],
pTokens: ['pbtc', 'tlos'],
pTokens: ['tlos'],
pTokenNetworks: {
pbtc: {
telos: 'Telos',
ptoken: 'Bitcoin',
},
tlos: {
telos: 'Telos',
tevm: 'tEVM',
ethereum: 'Ethereum',
tevm: 'Telos EVM',
},
},
});
Loading
Loading