@@ -22,7 +22,7 @@ import { usePointCache } from 'store/pointCache';
2222
2323import { getUpdatedPointMessage, isPlanet, toL1Details } from './utils/point';
2424import { convertToInt } from './convertToInt';
25−import { isDevelopment, isMainnet, isRopsten } from './flags';
25+import { isDevelopment } from './flags';
2626import {
2727 generateInviteWallet,
2828 getPendingSpawns,
@@ -30,14 +30,13 @@ import {
3030 registerProxyAddress,
3131 isL2Spawn,
3232} from './utils/roller';
33−import { POINT_DOMINIONS, ROLLER_HOSTS, TEN_SECONDS } from './constants';
33+import { POINT_DOMINIONS, TEN_SECONDS } from './constants';
3434
3535import {
3636 Config,
3737 Ship,
3838 Proxy,
3939 RollerRPCAPI,
40− Options,
4140 EthAddress,
4241 UnspawnedPoints,
4342} from '@urbit/roller-api';
@@ -50,6 +49,7 @@ import { showNotification } from './utils/notifications';
5049import { useWalletConnect } from './useWalletConnect';
5150import { PendingL1Txn } from './types/PendingL1Transaction';
5251import { TRANSACTION_PROGRESS } from './reticket';
52+import { useRollerOptions } from './useRollerOptions';
5353
5454interface UpdateParams {
5555 point: number;
@@ -108,25 +108,7 @@ export default function useRoller() {
108108 } = useRollerStore();
109109 const [config, setConfig] = useState<Config | null>(null);
110110
111− const options: Options = useMemo(() => {
112− const type = isMainnet || isRopsten ? 'https' : 'http';
113− const host = isMainnet
114− ? ROLLER_HOSTS.MAINNET
115− : isRopsten
116− ? ROLLER_HOSTS.ROPSTEN
117− : ROLLER_HOSTS.LOCAL;
118− const port = isMainnet || isRopsten ? 443 : 8080;
119− const path = '/v1/roller';
120−
121− return {
122− transport: {
123− type,
124− host,
125− port,
126− path,
127− },
128− };
129− }, []);
111+ const { options } = useRollerOptions();
130112
131113 const api = useMemo(() => {
132114 return new RollerRPCAPI(options);