@@ -22,7 +22,7 @@ import { usePointCache } from 'store/pointCache';
23import { getUpdatedPointMessage, isPlanet, toL1Details } from './utils/point';
23import { getUpdatedPointMessage, isPlanet, toL1Details } from './utils/point';
24import { convertToInt } from './convertToInt';
24import { convertToInt } from './convertToInt';
25−import { isDevelopment, isMainnet, isRopsten } from './flags';
25+import { isDevelopment } from './flags';
27 generateInviteWallet,
27 generateInviteWallet,
28 getPendingSpawns,
28 getPendingSpawns,
@@ -30,14 +30,13 @@ import {
30 registerProxyAddress,
30 registerProxyAddress,
31 isL2Spawn,
31 isL2Spawn,
32} from './utils/roller';
32} from './utils/roller';
33−import { POINT_DOMINIONS, ROLLER_HOSTS, TEN_SECONDS } from './constants';
33+import { POINT_DOMINIONS, TEN_SECONDS } from './constants';
39 RollerRPCAPI,
39 RollerRPCAPI,
41 EthAddress,
40 EthAddress,
42 UnspawnedPoints,
41 UnspawnedPoints,
43} from '@urbit/roller-api';
42} from '@urbit/roller-api';
@@ -50,6 +49,7 @@ import { showNotification } from './utils/notifications';
50import { useWalletConnect } from './useWalletConnect';
49import { useWalletConnect } from './useWalletConnect';
51import { PendingL1Txn } from './types/PendingL1Transaction';
50import { PendingL1Txn } from './types/PendingL1Transaction';
52import { TRANSACTION_PROGRESS } from './reticket';
51import { TRANSACTION_PROGRESS } from './reticket';
52+import { useRollerOptions } from './useRollerOptions';
54interface UpdateParams {
54interface UpdateParams {
55 point: number;
55 point: number;
@@ -108,25 +108,7 @@ export default function useRoller() {
108 } = useRollerStore();
108 } = useRollerStore();
109 const [config, setConfig] = useState<Config | null>(null);
109 const [config, setConfig] = useState<Config | null>(null);
111− const options: Options = useMemo(() => {
111+ const { options } = useRollerOptions();
112− const type = isMainnet || isRopsten ? 'https' : 'http';
113− const host = isMainnet
114− ? ROLLER_HOSTS.MAINNET
116− ? ROLLER_HOSTS.ROPSTEN
117− : ROLLER_HOSTS.LOCAL;
118− const port = isMainnet || isRopsten ? 443 : 8080;
119− const path = '/v1/roller';
131 const api = useMemo(() => {
113 const api = useMemo(() => {
132 return new RollerRPCAPI(options);
114 return new RollerRPCAPI(options);