Skip to content

Commit

Permalink
Revert "feat(Settings): add a known nodes switcher"
Browse files Browse the repository at this point in the history
This reverts commit a04496f.
  • Loading branch information
alexesDev committed Aug 21, 2023
1 parent a04496f commit 855aa7a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions src/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ type Props = {
newNode: string;
};

const knownNodes = [
'https://main.rpc.agoric.net',
'https://devnet.rpc.agoric.net',
'https://ollinet.rpc.agoric.net',
'https://emerynet.rpc.agoric.net',
'http://localhost:26657',
];

export function Settings({ newNode }: Props) {
const { node, foldAmountObject, dispatch } = useStore('node', 'foldAmountObject');
const [currentNode, setCurrentNode] = useState(newNode || node);
Expand All @@ -37,12 +29,6 @@ export function Settings({ newNode }: Props) {
<div>
<input value={currentNode} onChange={(e) => setCurrentNode(e.target.value)} className={s.nodeInput} />
<button type="submit">Save</button>

{knownNodes.map((n) => (
<button type="button" key={n} style={{ marginLeft: 10 }} onClick={() => dispatch('setNode', n)}>
{n.replace(/^https?:\/\//g, '').replace('.rpc.agoric.net', '')}
</button>
))}
</div>
<div>
<label htmlFor="toggleFoldAmountObject">
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const useDefaultHashState = (): [HashState, string] => {
useEffect(() => {
const fn = () => {
if (skipNextHashUpdate) {
skipNextHashUpdate = false;
skipNextHashUpdate = false
} else {
setDefaultState(getDefaultHashState());
}
Expand Down

0 comments on commit 855aa7a

Please sign in to comment.