mirror of
https://github.com/status-im/status-lib.git
synced 2025-02-18 07:16:40 +00:00
- all unused/unnecessary files remove - `statusgo_backend_new` content promoted to main content - only necessary submodules for `status-lib` are kept
16 lines
611 B
Nim
16 lines
611 B
Nim
import json
|
|
import ./core, ./response_type
|
|
|
|
export response_type
|
|
|
|
proc getCustomTokens*(): RpcResponse[JsonNode] {.raises: [Exception].} =
|
|
return callPrivateRPC("wallet_getCustomTokens", %* [])
|
|
|
|
proc addCustomToken*(address: string, name: string, symbol: string, decimals: int, color: string) {.raises: [Exception].} =
|
|
discard callPrivateRPC("wallet_addCustomToken", %* [
|
|
{"address": address, "name": name, "symbol": symbol, "decimals": decimals, "color": color}
|
|
])
|
|
|
|
proc removeCustomToken*(address: string) {.raises: [Exception].} =
|
|
discard callPrivateRPC("wallet_deleteCustomToken", %* [address])
|