@@ -1,16 +1,21 @@
11import { useCallback, useEffect, useMemo, useState } from 'react';
22import { Config, RollerRPCAPI, Options } from '@urbit/roller-api';
3−import { isDevelopment } from './flags';
3+import { isDevelopment, isRopsten } from './flags';
4+import { ROLLER_HOSTS } from './constants';
45
56export default function useRoller() {
67 const [config, setConfig] = useState<Config | null>(null);
78
89 const options: Options = useMemo(() => {
9− const type = isDevelopment ? 'http' : 'https';
10− // TODO: What is the prod host?
11− const host = isDevelopment ? 'localhost' : 'bridge.urbit.org';
10+ const type = isRopsten || !isDevelopment ? 'https' : 'http';
11+ const host = isRopsten
12+ ? ROLLER_HOSTS.ROPSTEN
13+ : isDevelopment
14+ ? ROLLER_HOSTS.LOCAL
15+ : ROLLER_HOSTS.MAINNET;
1216 const port = 80;
1317 const path = '/v1/roller';
18+
1419 return {
1520 transport: {
1621 type,