修改链相关配置

This commit is contained in:
cebgcontract 2022-04-01 08:18:37 +08:00
parent df750fb43d
commit b5fb647dd0
2 changed files with 17 additions and 3 deletions

View File

@ -60,7 +60,7 @@ import GameCoinCard from '@/components/market/wallet/GameCoinCard.vue'
import { AppModule } from '@/store/modules/app'
import PlaceholderPanel from '@/components/market/wallet/PlaceholderPanel.vue'
import ChainManager from '@/chain/ChainManager'
import { CONTRACT_ADDRESS } from '@/configs/config_chain'
import { CONTRACT_ADDRESS, OFFICE_ACCOUNT } from '@/configs/config_chain'
import { formatPrice } from '@/utils/chain.util'
import { getUserInfo } from '@/api/User'
import PricePickerModal, { SHOW_AMOUNT_MODAL } from '@/components/market/PricePickerModal.vue'
@ -281,7 +281,7 @@ export default class WalletPanel extends Vue {
async beginTransfer(data: ICoinData, amount: number) {
return this.chainManager.transferToAccount({
to: '0x50A8e60041A206AcaA5F844a1104896224be6F39',
to: OFFICE_ACCOUNT,
amount: amount,
chainId: data.chain!,
address: data.address!
@ -374,6 +374,12 @@ export default class WalletPanel extends Vue {
this.updateGameCoins()
this.updateBalanceSet()
this.$alert('Congratulations', 'Deposit Success', { type: 'success', confirmButtonText: 'OK' })
} else if (res.state === 3) {
this.resetTmpOrderId()
this.showOrderStatus = false
this.updateGameCoins()
this.updateBalanceSet()
this.$alert('Sorry', 'Deposit failed', { type: 'error', confirmButtonText: 'OK' })
}
} catch (err) {
console.log(err)
@ -399,6 +405,12 @@ export default class WalletPanel extends Vue {
this.updateGameCoins()
this.updateBalanceSet()
this.$alert('Congratulations', 'Claim Success', { type: 'success', confirmButtonText: 'OK' })
} else if (res.state === 3) {
this.resetTmpOrderId()
this.showOrderStatus = false
this.updateGameCoins()
this.updateBalanceSet()
this.$alert('Sorry', 'Claim failed', { type: 'error', confirmButtonText: 'OK' })
}
} catch (err) {
console.log(err)

View File

@ -14,11 +14,13 @@ export const AVAILABLE_CHAINS = env === 'development' ? [322, 97] : [321, 32]
export const MALL_ADDRESS = '0xF278ff771F9E24968083B0bA54Cb42eb4B23C2d7'
export const OFFICE_ACCOUNT = '0x50A8e60041A206AcaA5F844a1104896224be6F39'
export const CONTRACT_ADDRESS:{[key: number]: any} = {
322: {
cec: '0xfeFc3aab779863c1624eE008aba485c53805dCeb',
ceg: '0xE388e872e63aadF5a4F1521E4d96C10A28091457',
eth: '0xb296bab2ed122a85977423b602ddf3527582a3da',
eth: '0x67f6a7BbE0da067A747C6b2bEdF8aBBF7D6f60dc',
mall: '0xF278ff771F9E24968083B0bA54Cb42eb4B23C2d7'
},
97: {