codechain-sdk-js icon indicating copy to clipboard operation
codechain-sdk-js copied to clipboard

Change all of the SDK functions to arrow function

Open joojis opened this issue 6 years ago • 0 comments

Currently, the below example doesn't work

let sdk = new SDK(...);
let { getBlock, ... } = sdk.rpc.chain;

getBlock("0x123..").then(...)

Because of the function context.

Changing all the functions to the arrow function is one of the solutions.

joojis avatar Jul 18 '18 06:07 joojis