Skip to content

Commit

Permalink
display the correct soroban network
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeesun Kim authored and Jeesun Kim committed Mar 26, 2024
1 parent 112df0a commit 1ad8953
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/SorobanBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useIsSoroban } from "hooks/useIsSoroban";
import { useRedux } from "hooks/useRedux";

export const SorobanBanner = () => {
let isSoroban = useIsSoroban();
const { network } = useRedux("network");

return isSoroban ? (
<div className="LaboratoryChrome__soroban_alert s-alert">
Expand All @@ -14,7 +16,7 @@ export const SorobanBanner = () => {
>
Soroban
</a>{" "}
test network
{network.current.name} network
</div>
</div>
) : null;
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useIsSoroban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import NETWORK from "constants/network.js";
import { useRedux } from "hooks/useRedux";

export const useIsSoroban = () => {
const { network } = useRedux("network", "routing");
const { network } = useRedux("network");
const { horizonURL, networkPassphrase } = network.current;
const url = new URL(horizonURL);

Expand Down

0 comments on commit 1ad8953

Please sign in to comment.