Skip to content
Snippets Groups Projects
Commit 2c9c9fc4 authored by Johan Nordberg's avatar Johan Nordberg
Browse files

Typofixes

parent 2a439c8b
No related branches found
No related tags found
No related merge requests found
...@@ -124,6 +124,7 @@ class Steem extends EventEmitter { ...@@ -124,6 +124,7 @@ class Steem extends EventEmitter {
call(method, params, callback) { call(method, params, callback) {
if (this._transportType !== 'http') { if (this._transportType !== 'http') {
callback(new Error('RPC methods can only be called when using http transport')); callback(new Error('RPC methods can only be called when using http transport'));
return
} }
const id = ++this.seqNo; const id = ++this.seqNo;
jsonRpcCall(this.options.uri, {method, params, id}) jsonRpcCall(this.options.uri, {method, params, id})
......
...@@ -17,7 +17,7 @@ class RPCError extends Error { ...@@ -17,7 +17,7 @@ class RPCError extends Error {
export function jsonRpcCall(uri, {method, id, params}) { export function jsonRpcCall(uri, {method, id, params}) {
const payload = {id, jsonrpc: '2.0', method, params}; const payload = {id, jsonrpc: '2.0', method, params};
fetch(uri, { return fetch(uri, {
body: JSON.stringify(payload), body: JSON.stringify(payload),
headers: {'User-Agent': 'steem-js/1'}, headers: {'User-Agent': 'steem-js/1'},
method: 'post', method: 'post',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment