import fetchRPC from '.';

export default({
  title: 'fetchRPC',
});

export function testNewDealsGet() {
  const options = {
    limit: 10,
  };

  const get = async () => {
    // const res = await fetchRPC.setEndpoint('https://local.bestprice.gr:3002/backend')('bp.deals.get', options, { host: 'http://192.168.10.254:40088' });

    const res = await fetchRPC.setEndpoint('https://rpc.bestprice.gr/backend')('bp.deals.get', options, { host: 'http://192.168.10.254:40088' });

    console.log(res);
  };

  return <div><button onClick={get}>Get</button></div>;
}