chore(savedaddresses): favourite property removed
This commit is contained in:
parent
40ed061402
commit
1e972950e6
|
@ -37,8 +37,8 @@ proc getSavedAddresses*(self: Controller): seq[saved_address_service.SavedAddres
|
|||
return self.savedAddressService.getSavedAddresses()
|
||||
|
||||
proc createOrUpdateSavedAddress*(self: Controller, name: string, address: string, ens: string, colorId: string,
|
||||
favourite: bool, chainShortNames: string) =
|
||||
self.savedAddressService.createOrUpdateSavedAddress(name, address, ens, colorId, favourite, chainShortNames)
|
||||
chainShortNames: string) =
|
||||
self.savedAddressService.createOrUpdateSavedAddress(name, address, ens, colorId, chainShortNames)
|
||||
|
||||
proc deleteSavedAddress*(self: Controller, address: string, ens: string) =
|
||||
self.savedAddressService.deleteSavedAddress(address, ens)
|
||||
|
|
|
@ -18,7 +18,7 @@ method loadSavedAddresses*(self: AccessInterface) {.base.} =
|
|||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method createOrUpdateSavedAddress*(self: AccessInterface, name: string, address: string, ens: string, colorId: string,
|
||||
favourite: bool, chainShortNames: string) {.base.} =
|
||||
chainShortNames: string) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method deleteSavedAddress*(self: AccessInterface, address: string, ens: string) {.base.} =
|
||||
|
|
|
@ -8,7 +8,6 @@ type
|
|||
address: string
|
||||
ens: string
|
||||
colorId: string
|
||||
favourite: bool
|
||||
chainShortNames: string
|
||||
isTest: bool
|
||||
|
||||
|
@ -17,13 +16,11 @@ proc initItem*(
|
|||
address: string,
|
||||
ens: string,
|
||||
colorId: string,
|
||||
favourite: bool,
|
||||
chainShortNames: string,
|
||||
isTest: bool
|
||||
): Item =
|
||||
result.name = name
|
||||
result.address = address
|
||||
result.favourite = favourite
|
||||
result.ens = ens
|
||||
result.colorId = colorId
|
||||
result.chainShortNames = chainShortNames
|
||||
|
@ -35,7 +32,6 @@ proc `$`*(self: Item): string =
|
|||
address: {self.address},
|
||||
ens: {self.ens},
|
||||
colorId: {self.colorId},
|
||||
favourite: {self.favourite},
|
||||
chainShortNames: {self.chainShortNames},
|
||||
isTest: {self.isTest},
|
||||
]"""
|
||||
|
@ -55,9 +51,6 @@ proc getAddress*(self: Item): string =
|
|||
proc getColorId*(self: Item): string =
|
||||
return self.colorId
|
||||
|
||||
proc getFavourite*(self: Item): bool =
|
||||
return self.favourite
|
||||
|
||||
proc getChainShortNames*(self: Item): string =
|
||||
return self.chainShortNames
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ type
|
|||
Address
|
||||
Ens
|
||||
ColorId
|
||||
Favourite
|
||||
ChainShortNames
|
||||
IsTest
|
||||
|
||||
|
@ -54,7 +53,6 @@ QtObject:
|
|||
ModelRole.Address.int:"address",
|
||||
ModelRole.Ens.int:"ens",
|
||||
ModelRole.ColorId.int:"colorId",
|
||||
ModelRole.Favourite.int:"favourite",
|
||||
ModelRole.ChainShortNames.int:"chainShortNames",
|
||||
ModelRole.IsTest.int:"isTest",
|
||||
}.toTable
|
||||
|
@ -78,8 +76,6 @@ QtObject:
|
|||
result = newQVariant(item.getEns())
|
||||
of ModelRole.ColorId:
|
||||
result = newQVariant(item.getColorId())
|
||||
of ModelRole.Favourite:
|
||||
result = newQVariant(item.getFavourite())
|
||||
of ModelRole.ChainShortNames:
|
||||
result = newQVariant(item.getChainShortNames())
|
||||
of ModelRole.IsTest:
|
||||
|
@ -94,7 +90,6 @@ QtObject:
|
|||
of "address": result = $item.getAddress()
|
||||
of "ens": result = $item.getEns()
|
||||
of "colorId": result = $item.getColorId()
|
||||
of "favourite": result = $item.getFavourite()
|
||||
of "chainShortNames": result = $item.getChainShortNames()
|
||||
of "isTest": result = $item.getIsTest()
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ method loadSavedAddresses*(self: Module) =
|
|||
s.address,
|
||||
s.ens,
|
||||
s.colorId,
|
||||
s.favourite,
|
||||
s.chainShortNames,
|
||||
s.isTest,
|
||||
))
|
||||
|
@ -59,8 +58,8 @@ method viewDidLoad*(self: Module) =
|
|||
self.delegate.savedAddressesModuleDidLoad()
|
||||
|
||||
method createOrUpdateSavedAddress*(self: Module, name: string, address: string, ens: string, colorId: string,
|
||||
favourite: bool, chainShortNames: string) =
|
||||
self.controller.createOrUpdateSavedAddress(name, address, ens, colorId, favourite, chainShortNames)
|
||||
chainShortNames: string) =
|
||||
self.controller.createOrUpdateSavedAddress(name, address, ens, colorId, chainShortNames)
|
||||
|
||||
method deleteSavedAddress*(self: Module, address: string, ens: string) =
|
||||
self.controller.deleteSavedAddress(address, ens)
|
||||
|
@ -89,7 +88,6 @@ method getSavedAddressAsJson*(self: Module, address: string): string =
|
|||
"address": item.getAddress(),
|
||||
"ens": item.getEns(),
|
||||
"colorId": item.getColorId(),
|
||||
"favourite": item.getFavourite(),
|
||||
"chainShortNames": item.getChainShortNames(),
|
||||
"isTest": item.getIsTest(),
|
||||
}
|
||||
|
|
|
@ -43,8 +43,8 @@ QtObject:
|
|||
proc savedAddressAddedOrUpdated*(self: View, added: bool, name: string, address: string, ens: string, errorMsg: string) {.signal.}
|
||||
|
||||
proc createOrUpdateSavedAddress*(self: View, name: string, address: string, ens: string, colorId: string,
|
||||
favourite: bool, chainShortNames: string) {.slot.} =
|
||||
self.delegate.createOrUpdateSavedAddress(name, address, ens, colorId, favourite, chainShortNames)
|
||||
chainShortNames: string) {.slot.} =
|
||||
self.delegate.createOrUpdateSavedAddress(name, address, ens, colorId, chainShortNames)
|
||||
|
||||
proc savedAddressDeleted*(self: View, name: string, address: string, ens: string, errorMsg: string) {.signal.}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ type
|
|||
name: string
|
||||
address: string
|
||||
colorId: string
|
||||
favourite: bool
|
||||
chainShortNames: string
|
||||
ens: string
|
||||
isTestAddress: bool
|
||||
|
@ -27,7 +26,6 @@ const upsertSavedAddressTask: Task = proc(argEncoded: string) {.gcsafe, nimcall.
|
|||
name: arg.name,
|
||||
address: arg.address,
|
||||
colorId: arg.colorId,
|
||||
favourite: arg.favourite,
|
||||
chainShortNames: arg.chainShortNames,
|
||||
ens: arg.ens,
|
||||
isTest: arg.isTestAddress)
|
||||
|
|
|
@ -8,7 +8,6 @@ type
|
|||
address*: string
|
||||
ens*: string
|
||||
colorId*: string
|
||||
favourite*: bool
|
||||
chainShortNames*: string
|
||||
isTest*: bool
|
||||
createdAt*: int64
|
||||
|
@ -20,7 +19,6 @@ proc toSavedAddressDto*(jsonObj: JsonNode): SavedAddressDto =
|
|||
discard jsonObj.getProp("ens", result.ens)
|
||||
discard jsonObj.getProp("colorId", result.colorId)
|
||||
result.colorId = result.colorId.toUpper() # to match `preDefinedWalletAccountColors` on the qml side
|
||||
discard jsonObj.getProp("favourite", result.favourite)
|
||||
discard jsonObj.getProp("chainShortNames", result.chainShortNames)
|
||||
discard jsonObj.getProp("isTest", result.isTest)
|
||||
discard jsonObj.getProp("createdAt", result.createdAt)
|
|
@ -85,13 +85,12 @@ QtObject:
|
|||
return self.savedAddresses
|
||||
|
||||
proc createOrUpdateSavedAddress*(self: Service, name: string, address: string, ens: string, colorId: string,
|
||||
favourite: bool, chainShortNames: string) =
|
||||
chainShortNames: string) =
|
||||
let arg = SavedAddressTaskArg(
|
||||
name: name,
|
||||
address: address,
|
||||
ens: ens,
|
||||
colorId: colorId,
|
||||
favourite: favourite,
|
||||
chainShortNames: chainShortNames,
|
||||
isTestAddress: self.settingsService.areTestNetworksEnabled(),
|
||||
tptr: cast[ByteAddress](upsertSavedAddressTask),
|
||||
|
|
|
@ -24,7 +24,6 @@ StatusListItem {
|
|||
property string ens
|
||||
property string colorId
|
||||
property string chainShortNames
|
||||
property bool favourite: false
|
||||
property bool areTestNetworksEnabled: false
|
||||
property bool isSepoliaEnabled: false
|
||||
|
||||
|
@ -70,7 +69,6 @@ StatusListItem {
|
|||
id: d
|
||||
|
||||
readonly property string visibleAddress: root.address == Constants.zeroAddress ? root.ens : root.address
|
||||
readonly property bool favouriteEnabled: false // Disabling favourite functionality until good times
|
||||
}
|
||||
|
||||
components: [
|
||||
|
@ -93,7 +91,6 @@ StatusListItem {
|
|||
{
|
||||
name: root.name,
|
||||
address: root.address,
|
||||
favourite: root.favourite,
|
||||
chainShortNames: root.chainShortNames,
|
||||
ens: root.ens,
|
||||
colorId: root.colorId,
|
||||
|
@ -108,7 +105,6 @@ StatusListItem {
|
|||
id: menu
|
||||
property string name
|
||||
property string address
|
||||
property bool storeFavourite
|
||||
property string chainShortNames
|
||||
property string ens
|
||||
property string colorId
|
||||
|
@ -120,7 +116,6 @@ StatusListItem {
|
|||
function openMenu(parent, x, y, model) {
|
||||
menu.name = model.name;
|
||||
menu.address = model.address;
|
||||
menu.storeFavourite = model.favourite;
|
||||
menu.chainShortNames = model.chainShortNames;
|
||||
menu.ens = model.ens;
|
||||
menu.colorId = model.colorId;
|
||||
|
@ -129,7 +124,6 @@ StatusListItem {
|
|||
onClosed: {
|
||||
menu.name = "";
|
||||
menu.address = "";
|
||||
menu.storeFavourite = false;
|
||||
menu.chainShortNames = ""
|
||||
menu.ens = ""
|
||||
menu.colorId = ""
|
||||
|
@ -143,7 +137,6 @@ StatusListItem {
|
|||
edit: true,
|
||||
address: menu.address,
|
||||
name: menu.name,
|
||||
favourite: menu.storeFavourite,
|
||||
chainShortNames: menu.chainShortNames,
|
||||
ens: menu.ens,
|
||||
colorId: menu.colorId
|
||||
|
|
|
@ -52,7 +52,6 @@ StatusDialog {
|
|||
d.ens = params.ens?? ""
|
||||
d.colorId = d.storedColorId
|
||||
d.chainShortNames = d.storedChainShortNames
|
||||
d.favourite = params.favourite?? false
|
||||
|
||||
d.initialized = true
|
||||
|
||||
|
@ -84,7 +83,6 @@ StatusDialog {
|
|||
property string ens: ""
|
||||
property string colorId: ""
|
||||
property string chainShortNames: ""
|
||||
property bool favourite: false
|
||||
|
||||
property string storedName: ""
|
||||
property string storedColorId: ""
|
||||
|
@ -120,7 +118,7 @@ StatusDialog {
|
|||
|| event !== undefined && event.key !== Qt.Key_Return && event.key !== Qt.Key_Enter)
|
||||
return
|
||||
|
||||
RootStore.createOrUpdateSavedAddress(d.name, d.address, d.ens, d.colorId, d.favourite, d.chainShortNames)
|
||||
RootStore.createOrUpdateSavedAddress(d.name, d.address, d.ens, d.colorId, d.chainShortNames)
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -260,7 +260,6 @@ QtObject {
|
|||
address: "",
|
||||
ens: "",
|
||||
colorId: Constants.walletAccountColors.primary,
|
||||
favourite: false,
|
||||
chainShortNames: "",
|
||||
isTest: false,
|
||||
}
|
||||
|
@ -350,9 +349,9 @@ QtObject {
|
|||
return walletSectionAccounts.getColorByAddress(address)
|
||||
}
|
||||
|
||||
function createOrUpdateSavedAddress(name, address, ens, colorId, favourite, chainShortNames) {
|
||||
function createOrUpdateSavedAddress(name, address, ens, colorId, chainShortNames) {
|
||||
root.addingSavedAddress = true
|
||||
walletSectionSavedAddresses.createOrUpdateSavedAddress(name, address, ens, colorId, favourite, chainShortNames)
|
||||
walletSectionSavedAddresses.createOrUpdateSavedAddress(name, address, ens, colorId, chainShortNames)
|
||||
}
|
||||
|
||||
function deleteSavedAddress(address, ens) {
|
||||
|
|
|
@ -89,7 +89,6 @@ ColumnLayout {
|
|||
chainShortNames: model.chainShortNames
|
||||
ens: model.ens
|
||||
colorId: model.colorId
|
||||
favourite: model.favourite
|
||||
store: RootStore
|
||||
contactsStore: root.contactsStore
|
||||
areTestNetworksEnabled: RootStore.areTestNetworksEnabled
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9d9c40b7cffa6af901c06836ef576ad5a91c51bc
|
||||
Subproject commit 280f48877dca605c273aef6a9d2b312036671c97
|
Loading…
Reference in New Issue