mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-16 16:47:24 +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
|
||||
name: string
|
||||
address: string
|
||||
mixedcaseAddress: string
|
||||
path: string
|
||||
color: string
|
||||
publicKey: string
|
||||
@ -45,13 +46,18 @@ QtObject:
|
||||
|
||||
proc getAddress(self: View): QVariant {.slot.} =
|
||||
return newQVariant(self.address)
|
||||
|
||||
proc addressChanged(self: View) {.signal.}
|
||||
|
||||
QtProperty[QVariant] address:
|
||||
read = getAddress
|
||||
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.} =
|
||||
return newQVariant(self.path)
|
||||
|
||||
@ -127,25 +133,37 @@ QtObject:
|
||||
proc update(self: View, address: string, accountName: string, color: string, emoji: string) {.slot.} =
|
||||
self.delegate.update(address, accountName, color, emoji)
|
||||
|
||||
proc setData*(self: View, dto: wallet_account_service.WalletAccountDto) =
|
||||
self.name = dto.name
|
||||
self.nameChanged()
|
||||
self.address = dto.address
|
||||
self.addressChanged()
|
||||
self.path = dto.path
|
||||
self.pathChanged()
|
||||
self.color = dto.color
|
||||
self.colorChanged()
|
||||
self.publicKey = dto.publicKey
|
||||
self.publicKeyChanged()
|
||||
self.walletType = dto.walletType
|
||||
self.walletTypeChanged()
|
||||
self.isChat = dto.isChat
|
||||
self.isChatChanged()
|
||||
self.currencyBalance = dto.getCurrencyBalance()
|
||||
self.currencyBalanceChanged()
|
||||
self.emoji = dto.emoji
|
||||
self.emojiChanged()
|
||||
proc setData*(self: View, dto: wallet_account_service.WalletAccountDto) =
|
||||
if(self.name != dto.name):
|
||||
self.name = dto.name
|
||||
self.nameChanged()
|
||||
if(self.address != dto.address):
|
||||
self.address = dto.address
|
||||
self.addressChanged()
|
||||
if(self.mixedcaseAddress != dto.mixedcaseAddress):
|
||||
self.mixedcaseAddress = dto.mixedcaseAddress
|
||||
self.mixedcaseAddressChanged()
|
||||
if(self.path != dto.path):
|
||||
self.path = dto.path
|
||||
self.pathChanged()
|
||||
if(self.color != dto.color):
|
||||
self.color = dto.color
|
||||
self.colorChanged()
|
||||
if(self.publicKey != dto.publicKey):
|
||||
self.publicKey = dto.publicKey
|
||||
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()
|
||||
|
||||
|
@ -18,6 +18,7 @@ type
|
||||
WalletAccountDto* = ref object of RootObj
|
||||
name*: string
|
||||
address*: string
|
||||
mixedcaseAddress*: string
|
||||
path*: string
|
||||
color*: string
|
||||
publicKey*: string
|
||||
@ -57,6 +58,7 @@ proc toWalletAccountDto*(jsonObj: JsonNode): WalletAccountDto =
|
||||
result = WalletAccountDto()
|
||||
discard jsonObj.getProp("name", result.name)
|
||||
discard jsonObj.getProp("address", result.address)
|
||||
discard jsonObj.getProp("mixedcase-address", result.mixedcaseAddress)
|
||||
discard jsonObj.getProp("path", result.path)
|
||||
discard jsonObj.getProp("color", result.color)
|
||||
discard jsonObj.getProp("wallet", result.isWallet)
|
||||
|
@ -61,7 +61,7 @@ Item {
|
||||
|
||||
StatusExpandableAddress {
|
||||
id: walletAddress
|
||||
address: currentAccount.address
|
||||
address: currentAccount.mixedcaseAddress
|
||||
anchors.top: title.bottom
|
||||
anchors.left: title.left
|
||||
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