Remove debug console.log

This commit is contained in:
liangping 2021-08-27 12:57:52 +08:00
parent 6d63a46901
commit f0938dfcb1

View File

@ -152,9 +152,10 @@ import {
required, email, url, between, alpha, integer, password, min, digits, alphaDash, length, required, email, url, between, alpha, integer, password, min, digits, alphaDash, length,
} from '@validations' } from '@validations'
import { import {
formatToken, getLocalAccounts, getLocalChains, sign, timeIn, formatToken, getLocalAccounts, getLocalChains, setLocalTxHistory, sign, timeIn,
} from '@/libs/data' } from '@/libs/data'
import chainAPI from '@/libs/fetch' import chainAPI from '@/libs/fetch'
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
export default { export default {
name: 'TransforDialogue', name: 'TransforDialogue',
@ -175,6 +176,8 @@ export default {
ValidationProvider, ValidationProvider,
ValidationObserver, ValidationObserver,
// eslint-disable-next-line vue/no-unused-components
ToastificationContent,
}, },
props: { props: {
address: { address: {
@ -293,7 +296,6 @@ export default {
async sendTx() { async sendTx() {
const txMsgs = [] const txMsgs = []
this.delegations.forEach(i => { this.delegations.forEach(i => {
console.log(i.delegation.validator_address)
txMsgs.push({ txMsgs.push({
typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward', typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward',
value: { value: {
@ -328,8 +330,6 @@ export default {
chainId: this.chainId, chainId: this.chainId,
} }
console.log('tx:', txMsgs, txFee, signerData)
sign( sign(
this.wallet, this.wallet,
this.chainId, this.chainId,
@ -338,10 +338,18 @@ export default {
txFee, txFee,
this.memo, this.memo,
signerData, signerData,
).then((bodyBytes, s) => { ).then(bodyBytes => {
console.log('signed: ', bodyBytes, s)
this.$http.broadcastTx(bodyBytes, this.selectedChain).then(res => { this.$http.broadcastTx(bodyBytes, this.selectedChain).then(res => {
console.log(res) setLocalTxHistory({ op: 'delegate', hash: res.tx_response.txhash, time: new Date() })
this.$bvModal.hide('delegate-window')
this.$toast({
component: ToastificationContent,
props: {
title: 'Transaction sent!',
icon: 'EditIcon',
variant: 'success',
},
})
}).catch(e => { }).catch(e => {
this.error = e this.error = e
}) })