Skip to content

Commit

Permalink
refactor: remove ergo (#573)
Browse files Browse the repository at this point in the history
The Ergo support was never finished. This was the second attempt to add
it with little traction. I'm removing it from the code for now so we can
clean it up easier without supporting dead code paths.

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
  • Loading branch information
wolf31o2 authored Jan 12, 2025
1 parent b05563b commit eeec856
Show file tree
Hide file tree
Showing 21 changed files with 8 additions and 634 deletions.
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,3 @@

# Vending Machine API URL (default: preview API)
#VM_URL="https://vm.adaseal.eu"

# enable ergo side
#ERGO_ENABLED=false
6 changes: 1 addition & 5 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Blockchain } from "./entities/common.entities";
import BlockchainWrapper from "./layouts/BlockchainWrapper";
import MenuWrapper from "./layouts/MenuWrapper";
import ThemeWrapper from "./layouts/ThemeWrapper";
import { setChain, setErgoEnabled } from "./reducers/globalSlice";
import { setChain } from "./reducers/globalSlice";
import { getFeatures } from "./services/common";
import { RootState } from "./store";

Expand All @@ -24,16 +24,12 @@ function App() {

const init = async () => {
const features = await getFeatures();
dispatch(setErgoEnabled(features.ergo_enabled));
};

const initLocation = () => {
const isOnCardano = location.includes("cardano");
const isOnErgo = location.includes("ergo");
if (isOnCardano) {
dispatch(setChain(Blockchain.cardano));
} else if (isOnErgo) {
dispatch(setChain(Blockchain.ergo));
}
};

Expand Down
66 changes: 0 additions & 66 deletions client/src/components/BlockchainSelector/index.tsx

This file was deleted.

135 changes: 0 additions & 135 deletions client/src/components/Menu/ergo.tsx

This file was deleted.

31 changes: 7 additions & 24 deletions client/src/components/Menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
import { useSelector } from "react-redux";
import MenuCardano from "src/components/Menu/cardano";
import MenuErgo from "src/components/Menu/ergo";
import MobileMenuCardano from "src/components/MobileMenu/cardano";
import MobileMenuErgo from "src/components/MobileMenu/ergo";
import { Blockchain } from "src/entities/common.entities";
import { RootState } from "src/store";

export default function Menu() {
const chain = useSelector((state: RootState) => state.global.chain);

switch (chain) {
case Blockchain.cardano:
return (
<>
<MenuCardano></MenuCardano>
<MobileMenuCardano></MobileMenuCardano>
</>
);
case Blockchain.ergo:
return (
<>
<MenuErgo></MenuErgo>
<MobileMenuErgo></MobileMenuErgo>
</>
);
}
}
return (
<>
<MenuCardano></MenuCardano>
<MobileMenuCardano></MobileMenuCardano>
</>
);
};
Loading

0 comments on commit eeec856

Please sign in to comment.