refactor: add saved address to new backend
This commit is contained in:
parent
0e2d98da80
commit
bc3d85bad1
|
@ -0,0 +1,16 @@
|
||||||
|
import json
|
||||||
|
import ./core, ./response_type
|
||||||
|
|
||||||
|
export response_type
|
||||||
|
|
||||||
|
proc addSavedAddress*(name, address: string): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||||
|
let payload = %* [{"name": name, "address": address}]
|
||||||
|
return callPrivateRPC("wallet_addSavedAddress", payload)
|
||||||
|
|
||||||
|
proc deleteSavedAddress*(address: string): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||||
|
let payload = %* [address]
|
||||||
|
return callPrivateRPC("wallet_deleteSavedAddress", payload)
|
||||||
|
|
||||||
|
proc getSavedAddresses*(): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||||
|
let payload = %* []
|
||||||
|
return callPrivateRPC("wallet_getSavedAddresses", payload)
|
Loading…
Reference in New Issue