fix(sharedAddress): hide non fully imported accounts from shared address (#15480)

* fix(sharedAddress): hide non fully imported accounts from shared address

Fixes #15471

We only filtered out watch only accounts, but we also need to make sure it was a fully imported account, ie an account that is usable, hence why using `canSend`. It is the same property they use in the SendTransaction modal
This commit is contained in:
Jonathan Rainville 2024-07-11 10:47:51 -04:00 committed by GitHub
parent 69e793277f
commit ad612a794c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 6 deletions

View File

@ -11,6 +11,7 @@ ListModel {
color: "#2A4AF5",
address: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240",
walletType: "",
canSend: true,
position: 0,
assets: [
{
@ -55,6 +56,7 @@ ListModel {
color: "#216266",
address: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881",
walletType: Constants.generatedWalletType,
canSend: true,
position: 3,
assets: [
{
@ -81,6 +83,7 @@ ListModel {
color: "#EC266C",
address: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8882",
walletType: Constants.seedWalletType,
canSend: true,
position: 1,
assets: [
{
@ -116,6 +119,7 @@ ListModel {
color: "#CB6256",
address: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8883",
walletType: Constants.watchWalletType,
canSend: false,
position: 2,
assets: [
],
@ -133,6 +137,7 @@ ListModel {
color: "#C78F67",
address: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8884",
walletType: Constants.keyWalletType,
canSend: true,
position: 4,
assets: [
{

View File

@ -38,9 +38,8 @@ QObject {
readonly property var nonWatchAccounts: SortFilterProxyModel {
sourceModel: root.swapStore.accounts
filters: ValueFilter {
roleName: "walletType"
value: Constants.watchWalletType
inverted: true
roleName: "canSend"
value: true
}
sorters: [
RoleSorter { roleName: "currencyBalanceDouble"; sortOrder: Qt.DescendingOrder },

View File

@ -80,9 +80,8 @@ QtObject {
}
]
filters: ValueFilter {
roleName: "walletType"
value: Constants.watchWalletType
inverted: true
roleName: "canSend"
value: true
}
}