mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-19 18:18:38 +00:00
feat(@desktop/wallet): redesigned wallet addresses are missing checksum
Fixes #5473
This commit is contained in:
parent
83efbe6671
commit
c47f3f2692
@ -11,6 +11,7 @@ QtObject:
|
|||||||
delegate: io_interface.AccessInterface
|
delegate: io_interface.AccessInterface
|
||||||
name: string
|
name: string
|
||||||
address: string
|
address: string
|
||||||
|
mixedcaseAddress: string
|
||||||
path: string
|
path: string
|
||||||
color: string
|
color: string
|
||||||
publicKey: string
|
publicKey: string
|
||||||
@ -45,13 +46,18 @@ QtObject:
|
|||||||
|
|
||||||
proc getAddress(self: View): QVariant {.slot.} =
|
proc getAddress(self: View): QVariant {.slot.} =
|
||||||
return newQVariant(self.address)
|
return newQVariant(self.address)
|
||||||
|
|
||||||
proc addressChanged(self: View) {.signal.}
|
proc addressChanged(self: View) {.signal.}
|
||||||
|
|
||||||
QtProperty[QVariant] address:
|
QtProperty[QVariant] address:
|
||||||
read = getAddress
|
read = getAddress
|
||||||
notify = addressChanged
|
notify = addressChanged
|
||||||
|
|
||||||
|
proc getMixedcaseAddress(self: View): string {.slot.} =
|
||||||
|
return self.mixedcaseAddress
|
||||||
|
proc mixedcaseAddressChanged(self: View) {.signal.}
|
||||||
|
QtProperty[string] mixedcaseAddress:
|
||||||
|
read = getMixedcaseAddress
|
||||||
|
notify = mixedcaseAddressChanged
|
||||||
|
|
||||||
proc getPath(self: View): QVariant {.slot.} =
|
proc getPath(self: View): QVariant {.slot.} =
|
||||||
return newQVariant(self.path)
|
return newQVariant(self.path)
|
||||||
|
|
||||||
@ -127,25 +133,37 @@ QtObject:
|
|||||||
proc update(self: View, address: string, accountName: string, color: string, emoji: string) {.slot.} =
|
proc update(self: View, address: string, accountName: string, color: string, emoji: string) {.slot.} =
|
||||||
self.delegate.update(address, accountName, color, emoji)
|
self.delegate.update(address, accountName, color, emoji)
|
||||||
|
|
||||||
proc setData*(self: View, dto: wallet_account_service.WalletAccountDto) =
|
proc setData*(self: View, dto: wallet_account_service.WalletAccountDto) =
|
||||||
self.name = dto.name
|
if(self.name != dto.name):
|
||||||
self.nameChanged()
|
self.name = dto.name
|
||||||
self.address = dto.address
|
self.nameChanged()
|
||||||
self.addressChanged()
|
if(self.address != dto.address):
|
||||||
self.path = dto.path
|
self.address = dto.address
|
||||||
self.pathChanged()
|
self.addressChanged()
|
||||||
self.color = dto.color
|
if(self.mixedcaseAddress != dto.mixedcaseAddress):
|
||||||
self.colorChanged()
|
self.mixedcaseAddress = dto.mixedcaseAddress
|
||||||
self.publicKey = dto.publicKey
|
self.mixedcaseAddressChanged()
|
||||||
self.publicKeyChanged()
|
if(self.path != dto.path):
|
||||||
self.walletType = dto.walletType
|
self.path = dto.path
|
||||||
self.walletTypeChanged()
|
self.pathChanged()
|
||||||
self.isChat = dto.isChat
|
if(self.color != dto.color):
|
||||||
self.isChatChanged()
|
self.color = dto.color
|
||||||
self.currencyBalance = dto.getCurrencyBalance()
|
self.colorChanged()
|
||||||
self.currencyBalanceChanged()
|
if(self.publicKey != dto.publicKey):
|
||||||
self.emoji = dto.emoji
|
self.publicKey = dto.publicKey
|
||||||
self.emojiChanged()
|
self.publicKeyChanged()
|
||||||
|
if(self.walletType != dto.walletType):
|
||||||
|
self.walletType = dto.walletType
|
||||||
|
self.walletTypeChanged()
|
||||||
|
if(self.isChat != dto.isChat):
|
||||||
|
self.isChat = dto.isChat
|
||||||
|
self.isChatChanged()
|
||||||
|
if(self.currencyBalance != dto.getCurrencyBalance()):
|
||||||
|
self.currencyBalance = dto.getCurrencyBalance()
|
||||||
|
self.currencyBalanceChanged()
|
||||||
|
if(self.emoji != dto.emoji):
|
||||||
|
self.emoji = dto.emoji
|
||||||
|
self.emojiChanged()
|
||||||
|
|
||||||
let assets = token_model.newModel()
|
let assets = token_model.newModel()
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ type
|
|||||||
WalletAccountDto* = ref object of RootObj
|
WalletAccountDto* = ref object of RootObj
|
||||||
name*: string
|
name*: string
|
||||||
address*: string
|
address*: string
|
||||||
|
mixedcaseAddress*: string
|
||||||
path*: string
|
path*: string
|
||||||
color*: string
|
color*: string
|
||||||
publicKey*: string
|
publicKey*: string
|
||||||
@ -57,6 +58,7 @@ proc toWalletAccountDto*(jsonObj: JsonNode): WalletAccountDto =
|
|||||||
result = WalletAccountDto()
|
result = WalletAccountDto()
|
||||||
discard jsonObj.getProp("name", result.name)
|
discard jsonObj.getProp("name", result.name)
|
||||||
discard jsonObj.getProp("address", result.address)
|
discard jsonObj.getProp("address", result.address)
|
||||||
|
discard jsonObj.getProp("mixedcase-address", result.mixedcaseAddress)
|
||||||
discard jsonObj.getProp("path", result.path)
|
discard jsonObj.getProp("path", result.path)
|
||||||
discard jsonObj.getProp("color", result.color)
|
discard jsonObj.getProp("color", result.color)
|
||||||
discard jsonObj.getProp("wallet", result.isWallet)
|
discard jsonObj.getProp("wallet", result.isWallet)
|
||||||
|
@ -61,7 +61,7 @@ Item {
|
|||||||
|
|
||||||
StatusExpandableAddress {
|
StatusExpandableAddress {
|
||||||
id: walletAddress
|
id: walletAddress
|
||||||
address: currentAccount.address
|
address: currentAccount.mixedcaseAddress
|
||||||
anchors.top: title.bottom
|
anchors.top: title.bottom
|
||||||
anchors.left: title.left
|
anchors.left: title.left
|
||||||
addressWidth: 180
|
addressWidth: 180
|
||||||
|
2
vendor/status-go
vendored
2
vendor/status-go
vendored
@ -1 +1 @@
|
|||||||
Subproject commit cf8941c1d816306e1e5b5c91c8d2ad41604bbd93
|
Subproject commit 4018e4334beaaa5243a8a6e6450ecd5aeb3addef
|
Loading…
x
Reference in New Issue
Block a user