Skip to content

Commit

Permalink
Fix wrong type of function when download (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
Asmadek authored Aug 23, 2019
1 parent 23ea05d commit b738264
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 55 deletions.
4 changes: 2 additions & 2 deletions src/components/Home/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
v-if="pendingTransactionsAmount"
:value="pendingTransactionsAmount"
:max="9"
:class="[isMenuActive('transactions') ? 'badge active' : 'badge']"
:class="[isMenuActive('pendingTransactionsAmount') ? 'badge active' : 'badge']"
>
<SvgIcon
icon-name="Transaction"
Expand Down Expand Up @@ -178,7 +178,7 @@ export default {
return this.$route.path
},
pendingTransactionsAmount () {
return this.pendingTransferTransactions.length + this.pendingSettingsTransactions
return this.pendingTransferTransactions.length + this.pendingSettingsTransactions.length
}
},
watch: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ export default {
'removeSignatory',
'getSignatories',
'createAddSignatoryTransaction',
'createRemoveSignatoryTransaction'
'createRemoveSignatoryTransaction',
'openUploadTransactionDialog'
]),
addPublicKey () {
this.$v.$touch()
Expand All @@ -246,6 +247,8 @@ export default {
this.updateActiveTab(1)
this.addingNewKey = false
this.addKeyFormVisible = false

this.openUploadTransactionDialog()
},
removePublicKey () {
if (this.accountSignatories.length === 1) {
Expand All @@ -257,6 +260,8 @@ export default {
this.updateActiveTab(1)
this.removingKey = false
this.removeKeyFormVisible = false

this.openUploadTransactionDialog()
},
doCopy (key) {
const onSuccess = (e) => this.$message(`You just copied: ${e.text}`)
Expand Down
51 changes: 4 additions & 47 deletions src/components/Settings/components/Rightside/WhiteListCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ export default {
methods: {
...mapActions([
'setWhiteList',
'createSetWhiteListTransaction'
'createSetWhiteListTransaction',
'openUploadTransactionDialog'
]),
addWhiteAddress () {
this.$v.whitelistForm.$touch()
Expand Down Expand Up @@ -279,30 +280,7 @@ export default {
address: ''
}

// this.openApprovalDialog({ requiredMinAmount: this.accountQuorum })
// .then(privateKeys => {
// if (!privateKeys) return
// this.addingNewAddress = true
// return this.setWhiteList({
// privateKeys,
// whitelist,
// type: this.walletType
// })
// .then(() => {
// this.$message.success('Address successfully added')
// })
// .catch((err) => {
// this.$message.error('Failed to add address')
// console.error(err)
// })
// })
// .finally(() => {
// this.addAddressFormVisible = false
// this.addingNewAddress = false
// this.whitelistForm = {
// address: ''
// }
// })
this.openUploadTransactionDialog()
},
removeWhiteAddress () {
const whitelist = [
Expand All @@ -320,28 +298,7 @@ export default {
this.removingAddress = false
this.addressToRemove = null

// this.openApprovalDialog({ requiredMinAmount: this.accountQuorum })
// .then(privateKeys => {
// if (!privateKeys) return
// this.removingAddress = true
// return this.setWhiteList({
// privateKeys,
// whitelist,
// type: this.walletType
// })
// .then(() => {
// this.$message.success('Address successfully removed')
// })
// .catch((err) => {
// this.$message.error('Failed to remove address')
// console.error(err)
// })
// })
// .finally(() => {
// this.removeAddressFormVisible = false
// this.removingAddress = false
// this.addressToRemove = null
// })
this.openUploadTransactionDialog()
},

onCloseWhiteAddressForm () {
Expand Down
6 changes: 5 additions & 1 deletion src/components/Transactions/TransactionPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
<div>
<div class="transaction_description">
{{ scope.row.description }}
</div>
</template>
Expand Down Expand Up @@ -255,4 +255,8 @@ export default {
text-transform: uppercase;
padding: 0.7rem;
}
.transaction_description {
overflow: hidden;
text-overflow: ellipsis;
}
</style>
7 changes: 5 additions & 2 deletions src/store/Account.js
Original file line number Diff line number Diff line change
Expand Up @@ -1125,8 +1125,11 @@ const actions = {
createPendingTransaction ({ commit, state }, { txStoreId }) {
let transaction = state.rawUnsignedTransactions.getTransactionsList()[txStoreId]
const objectTransaction = transaction.toObject()
const batch = findBatchFromRaw(state.rawUnsignedTransactions, objectTransaction.payload.batch)
transaction = txHelper.createTxListFromArray(txHelper.addBatchMeta(batch, 0))

if (objectTransaction.payload.batch) {
const batch = findBatchFromRaw(state.rawUnsignedTransactions, objectTransaction.payload.batch)
transaction = txHelper.createTxListFromArray(txHelper.addBatchMeta(batch, 0))
}

transactionUtil.saveTransaction(transaction)
},
Expand Down
7 changes: 5 additions & 2 deletions src/util/store-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,12 @@ export function getSettingsTransactionsFrom (transactions, account) {
switch (key) {
case 'eth_whitelist': {
type = 'ETH whitlist'
description = `New whitelist: ${JSON.parse(value.replace(/\\/g, '')).join(', ')}`
break
}
case 'btc_whitelist': {
type = 'BTC whitelist'
description = `New whitelist: ${JSON.parse(value.replace(/\\/g, '')).join(', ')}`
break
}
case 'notifications': {
Expand Down Expand Up @@ -269,8 +271,9 @@ export function getSettingsTransactionsFrom (transactions, account) {
id: idx
}
}

transformed.push(tx)
if (tx) {
transformed.push(tx)
}
})
})

Expand Down

0 comments on commit b738264

Please sign in to comment.