diff --git a/status/statusgo_backend_new/eth.nim b/status/statusgo_backend_new/eth.nim index 979ace8..a7cb6a4 100644 --- a/status/statusgo_backend_new/eth.nim +++ b/status/statusgo_backend_new/eth.nim @@ -33,4 +33,7 @@ proc estimateGas*(payload = %* []): RpcResponse[JsonNode] {.raises: [Exception]. core.callPrivateRPC("eth_estimateGas", payload) proc getEthAccounts*(): RpcResponse[JsonNode] {.raises: [Exception].} = - return core.callPrivateRPC("eth_accounts") \ No newline at end of file + return core.callPrivateRPC("eth_accounts") + +proc getGasPrice*(payload = %* []): RpcResponse[JsonNode] {.raises: [Exception].} = + return core.callPrivateRPC("eth_gasPrice", payload) diff --git a/status/statusgo_backend_new/transactions.nim b/status/statusgo_backend_new/transactions.nim index 479f7c0..bb182f9 100644 --- a/status/statusgo_backend_new/transactions.nim +++ b/status/statusgo_backend_new/transactions.nim @@ -2,13 +2,6 @@ import json, stint, chronicles, strutils import ./core as core -type PendingTransactionType* {.pure.} = enum - RegisterENS = "RegisterENS", - SetPubKey = "SetPubKey", - ReleaseENS = "ReleaseENS", - BuyStickerPack = "BuyStickerPack" - WalletTransfer = "WalletTransfer" - proc checkRecentHistory*(addresses: seq[string]) {.raises: [Exception].} = let payload = %* [addresses] discard callPrivateRPC("wallet_checkRecentHistory", payload) @@ -19,6 +12,18 @@ proc getTransfersByAddress*(address: string, toBlock: Uint256, limitAsHexWithout callPrivateRPC("wallet_getTransfersByAddress", %* [address, toBlockParsed, limitAsHexWithoutLeadingZeros, loadMore]) -proc trackPendingTransaction*(hash: string, fromAddress: string, toAddress: string, trxType: PendingTransactionType, data: string): RpcResponse[JsonNode] {.raises: [Exception].} = - let payload = %* [{"hash": hash, "from": fromAddress, "to": toAddress, "type": $trxType, "additionalData": data, "data": "", "value": 0, "timestamp": 0, "gasPrice": 0, "gasLimit": 0}] +proc trackPendingTransaction*(hash: string, fromAddress: string, toAddress: string, trxType: string, data: string): + RpcResponse[JsonNode] {.raises: [Exception].} = + let payload = %* [{ + "hash": hash, + "from": fromAddress, + "to": toAddress, + "type": trxType, + "additionalData": data, + "data": "", + "value": 0, + "timestamp": 0, + "gasPrice": 0, + "gasLimit": 0 + }] callPrivateRPC("wallet_storePendingTransaction", payload) \ No newline at end of file