Skip to content

Commit

Permalink
Merge pull request #61 from eosnetworkfoundation/yarkin/0.9_last_fixes
Browse files Browse the repository at this point in the history
[0.9] last fixes
  • Loading branch information
yarkinwho authored Oct 13, 2023
2 parents 450fe9b + f16e33d commit cb215ff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
7 changes: 5 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { provide, reactive, ref, inject } from 'vue'
import { RouterView } from 'vue-router'
var env = location.host === 'bridge.evm.eosnetwork.com' ? 'MAINNET' : 'TESTNET'
const env = inject('env')
const i18n = inject('i18n')
const wallet = reactive({
connected: false,
Expand Down Expand Up @@ -37,7 +37,10 @@ const selectLang = (val) => {
<img v-else src="./assets/eos_evm_logo.svg" alt="" style="filter:invert(1); height: 45px;">
</a>
<b-navbar-nav class="ml-auto">
<b-nav-item-dropdown class="me-3" no-caret strategy="fixed" :text="env === 'TESTNET'?'Testnet':'Mainnet'" toggle-class="text-decoration-none" >
<b-nav-item-dropdown class="me-3" no-caret strategy="fixed" toggle-class="locale" >
<template #button-content>
{{env === 'TESTNET'?'Testnet':'Mainnet'}}
</template>
<b-dropdown-item :href="v" v-for="(v, k) in networks" :key="k">{{ k }}</b-dropdown-item>
</b-nav-item-dropdown>
<b-nav-item-dropdown class="me-3" no-caret strategy="fixed" toggle-class="locale">
Expand Down
21 changes: 14 additions & 7 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,6 @@ import { Api, JsonRpc, RpcError } from 'enf-eosjs';
const rpc = new JsonRpc('https://jungle4.api.eosnation.io:443', { fetch });
const api = new Api({ rpc, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });
const blockList = ['eosbndeposit', 'gateiowallet', 'bybitdeposit', 'bitgeteosdep', 'kucoindoteos', 'binancecleos']
const warningList = ['huobideposit', 'okbtothemoon']
export default {
name: 'home',
inject: ['wallet', 'env'],
Expand All @@ -264,8 +261,14 @@ export default {
{ name: 'JUNGLE', addr: '0x4ea3b729669bF6C34F7B80E5D6c17DB71F89F21F', logo: 'images/jungle.png', erc20_contract: null },
],
tokenListMainnet: [
{ name: 'EOS', addr: '', logo: 'images/eos.png' },
{ name: 'USDT', addr: '', logo: 'images/usdt.png' },
{ name: 'EOS', addr: '', logo: 'images/eos.png',
blockList: ['eosbndeposit', 'bybitdeposit', 'bitgeteosdep', 'kucoindoteos', 'binancecleos'],
warningList: ['huobideposit', 'okbtothemoon', 'gateiowallet', 'coinbasebase', 'krakenkraken']
},
{ name: 'USDT', addr: '0x4ea3b729669bF6C34F7B80E5D6c17DB71F89F21F', logo: 'images/usdt.png' ,
blockList: ['eosbndeposit', 'bybitdeposit', 'bitgeteosdep', 'kucoindoteos', 'binancecleos', 'coinbasebase', 'krakenkraken', 'huobideposit', 'okbtothemoon'],
warningList: ['gateiowallet']
},
],
}
},
Expand Down Expand Up @@ -319,11 +322,12 @@ export default {
return ''
}
if (blockList.includes(this.targetAddress)) {
if (this.blockList()?.includes(this.targetAddress)) {
this.extraWarning = ''
return new Error(this.$t('home.cexNotSupported'))
}
if (warningList.includes(this.targetAddress)) {
if (this.warningList()?.includes(this.targetAddress)) {
this.extraWarning = this.$t('home.cexExtraWarning')
} else {
this.extraWarning = ''
Expand Down Expand Up @@ -362,6 +366,9 @@ export default {
erc20_addr() { return this.tokenList[this.selectedToken].addr; },
tokenName() { return this.tokenList[this.selectedToken].name; },
blockList() { return this.tokenList[this.selectedToken].blockList; },
warningList() { return this.tokenList[this.selectedToken].warningList; },
async calcFee() {
if (this.disableTransfer) {
return
Expand Down

0 comments on commit cb215ff

Please sign in to comment.