2
0
mirror of https://github.com/status-im/status-lib.git synced 2025-01-25 19:59:09 +00:00
Anthony Laibe c7722cda00
refactor: Group profile function and eth function together ()
* refactor: Group profile function and eth function together

* refactor: group eth backend

* refactor: Move various eth call to eth backend

* refactor: move accounts call to account backend

* refactor: permission
2021-10-01 12:53:38 -04:00

24 lines
456 B
Nim

import sets
import strutils
import chronicles
logScope:
topics = "permission-type"
type
Permission* {.pure.} = enum
Web3 = "web3",
ContactCode = "contact-code"
Unknown = "unknown"
type Dapp* = object
name*: string
permissions*: HashSet[Permission]
proc toPermission*(value: string): Permission =
result = Permission.Unknown
try:
result = parseEnum[Permission](value)
except:
warn "Unknown permission requested", value