mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 14:54:48 +00:00
refactor(@desktop/wallet): Attach utils data to main account
This commit is contained in:
parent
0b38ec2568
commit
c97138c1dd
22
src/app/modules/main/wallet_section/main_account/item.nim
Normal file
22
src/app/modules/main/wallet_section/main_account/item.nim
Normal file
@ -0,0 +1,22 @@
|
||||
import strformat
|
||||
|
||||
type
|
||||
Item* = object
|
||||
etherscanLink: string
|
||||
signingPhrase: string
|
||||
|
||||
proc initItem*(etherscanLink: string, signingPhrase: string): Item =
|
||||
result.etherscanLink = etherscanLink
|
||||
result.signingPhrase = signingPhrase
|
||||
|
||||
proc `$`*(self: Item): string =
|
||||
result = fmt"""MainAccountItem(
|
||||
etherscanLink: {self.etherscanLink},
|
||||
signingPhrase: {self.signingPhrase}
|
||||
]"""
|
||||
|
||||
proc getEtherscanLink*(self: Item): string =
|
||||
return self.etherscanLink
|
||||
|
||||
proc getSigningPhrase*(self: Item): string =
|
||||
return self.signingPhrase
|
@ -1,8 +1,11 @@
|
||||
import NimQml
|
||||
|
||||
import ./item
|
||||
|
||||
QtObject:
|
||||
type
|
||||
View* = ref object of QObject
|
||||
item: Item
|
||||
|
||||
proc setup(self: View) =
|
||||
self.QObject.setup
|
||||
|
Loading…
x
Reference in New Issue
Block a user