Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Aug 30, 2024
1 parent 9fe349c commit 00a8833
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/NetworkByPasswordProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const NetworkByPasswordProvider = ({
}: {
children: React.ReactNode;
}) => {
const { updateIsDynamicNetworkSelect, transaction, selectNetwork } = useStore();
const { updateIsDynamicNetworkSelect, transaction, selectNetwork } =
useStore();

const searchParams = useSearchParams();

Expand All @@ -20,16 +21,17 @@ export const NetworkByPasswordProvider = ({
};

useEffect(() => {
let networkPassphrase = searchParams.get("networkPassphrase");
const networkPassphrase = searchParams.get("networkPassphrase");
const xdr = searchParams.get("xdr");

if (networkPassphrase) {
let network = getNetworkByPassphrase(networkPassphrase);
const network = getNetworkByPassphrase(networkPassphrase);
if (network) {
updateIsDynamicNetworkSelect(true);
selectNetwork(network);
}
}

let xdr = searchParams.get("xdr");
if (xdr) {
transaction.updateSignActiveView("overview");
transaction.updateSignImportXdr(xdr);
Expand Down

0 comments on commit 00a8833

Please sign in to comment.