Skip to content

Commit

Permalink
Navigate to Deployer without Login
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshpw committed Nov 6, 2024
1 parent 9268543 commit 02cff6f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/modules/creator/token/etherlink/steps/Ownership.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ export const Ownership: React.FC = () => {
<OptionButton
underline="none"
onClick={() => {
if (etherlink.isConnected) {
const href = `/creator/deployment`
history.push(href)
}
const href = `/creator/deployment`
history.push(href)
}}
>
<MainButton variant="contained" color="secondary">
Expand Down
17 changes: 12 additions & 5 deletions src/modules/creator/token/etherlink/steps/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ import {
ThirdContainerRow,
ThirdContainerLastRow
} from "../../ui"
import { useTezos } from "services/beacon/hooks/useTezos"
export const ContractSummary: React.FC = () => {
const theme = useTheme()
const isMobile = useMediaQuery(theme.breakpoints.down("sm"))
const history = useHistory()
const match = useRouteMatch()

const { etherlink, connect } = useTezos()
const { state, dispatch } = useContext(DeploymentContext)
const { tokenDistribution, tokenSettings } = state.data

Expand Down Expand Up @@ -64,15 +66,20 @@ export const ContractSummary: React.FC = () => {
},
next: {
handler: () => {
mutate({
...state.data
})
setIsLoading(true)
if (etherlink.isConnected) {
mutate({
...state.data
})
setIsLoading(true)
} else {
connect()
}
},
text: isLoading ? "Deploying..." : "Launch"
}
})
}, [dispatch, history, match.path, match.url, mutate, state.data, isLoading])
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [dispatch, history, match.path, match.url, mutate, state.data, isLoading, etherlink.isConnected])

return (
<>
Expand Down
2 changes: 2 additions & 0 deletions src/modules/lite/explorer/pages/ProposalDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export const ProposalDetails: React.FC<{ id: string }> = ({ id }) => {
poll?.referenceBlock
)

console.log({ voteWeight })

const [votingPower, setVotingPower] = useState(poll?.isXTZ ? voteWeight?.votingXTZWeight : voteWeight?.votingWeight)

const choices = usePollChoices(poll, refresh)
Expand Down

0 comments on commit 02cff6f

Please sign in to comment.