Skip to content

Commit

Permalink
fix: fixed accounts filter inside swap account selection
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleySuira committed Jan 6, 2023
1 parent cd6c6e1 commit d1f70d3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "liquality-wallet",
"version": "0.82.8",
"version": "0.82.9",
"private": true,
"author": "Liquality <[email protected]>",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import ToggleButton from 'vue-js-toggle-button'
import VTooltip from 'v-tooltip'
import '@/assets/scss/style.scss'

if (process.env.NODE_ENV === 'development' && process.env.VUE_APP_USE_VUE_DEV_TOOLS) {
devtools.connect()
}

Vue.use(ToggleButton)
Vue.use(VTooltip)
Vue.config.productionTip = false
Expand All @@ -22,3 +18,7 @@ new Vue({
store,
render: (h) => h(App)
}).$mount('#app')

if (process.env.NODE_ENV === 'development' && process.env.VUE_APP_USE_VUE_DEV_TOOLS) {
devtools.connect()
}
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manifest_version": 2,
"version": "0.82.8",
"version": "0.82.9",
"name": "__MSG_appName__",
"description": "__MSG_appDesc__",
"default_locale": "en",
Expand Down
9 changes: 6 additions & 3 deletions src/views/Swap/Accounts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export default {
accounts() {
return (this.assetSelection === 'from' ? this.accountsWithBalance : this.accountsData)
.filter((acc) => {
if (isEvmChain(this.activeNetwork, acc.chain) && this.assetSelection === 'to') {
return this.account.addresses[0] === acc.addresses[0] && acc.assets?.length > 0
if (isEvmChain(this.activeNetwork, this.account.chain) && this.assetSelection === 'to') {
return this.account.addresses[0] === acc.addresses[0]
}
return acc.assets?.length > 0
return true
})
.map((acc) => {
const assets = this.chainAssets[acc.chain].filter((asset) => asset !== this.excludeAsset)
Expand All @@ -52,6 +52,9 @@ export default {
assets
}
})
.filter((acc) => {
return acc.assets?.length > 0
})
}
},
components: {
Expand Down
10 changes: 5 additions & 5 deletions src/views/Swap/Swap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1295,11 +1295,11 @@ export default {
this.selectedQuote = null
}
this.cannotCoverMinimum =
!this.canSwap &&
!shouldChooseNewQuote &&
!BN(this.sendAmount).eq(this.defaultAmount) &&
BN(this.sendAmount).lt(this.max)
// this.cannotCoverMinimum =
// !this.canSwap &&
// !shouldChooseNewQuote &&
// !BN(this.sendAmount).eq(this.defaultAmount) &&
// BN(this.sendAmount).lt(this.max)
// if(this.cannotCoverMinimum) this.sendAmount = 1
this.resetQuoteTimer(!this.canSwap && shouldChooseNewQuote ? 1000 : QUOTE_TIMER_MS)
},
Expand Down

0 comments on commit d1f70d3

Please sign in to comment.