Skip to content

Commit

Permalink
refactor: remove fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
truemiller committed Aug 28, 2024
1 parent e6d7af9 commit b3d4356
Showing 1 changed file with 32 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,40 +287,38 @@ export const StakingContractSection = ({
{cantMigrateAlert}
{/* Switch to program button */}
{
<>
<Popover content={!isMigratable && cantMigrateReason}>
<Button
type="primary"
size="large"
disabled={!isMigratable}
onClick={async () => {
setIsServicePollingPaused(true);
try {
setServiceStatus(DeploymentStatus.DEPLOYING);
goto(Pages.Main);
// TODO: cleanup and call via hook

await ServicesService.createService({
stakingProgram,
serviceTemplate,
deploy: true,
});

await updateStakingProgram();

setMigrationModalOpen(true);
} catch (error) {
console.error(error);
} finally {
setIsServicePollingPaused(false);
updateServiceStatus();
}
}}
>
Switch to {activeStakingProgramMeta?.name} contract
</Button>
</Popover>
</>
<Popover content={!isMigratable && cantMigrateReason}>
<Button
type="primary"
size="large"
disabled={!isMigratable}
onClick={async () => {
setIsServicePollingPaused(true);
try {
setServiceStatus(DeploymentStatus.DEPLOYING);
goto(Pages.Main);
// TODO: cleanup and call via hook

await ServicesService.createService({
stakingProgram,
serviceTemplate,
deploy: true,
});

await updateStakingProgram();

setMigrationModalOpen(true);
} catch (error) {
console.error(error);
} finally {
setIsServicePollingPaused(false);
updateServiceStatus();
}
}}
>
Switch to {activeStakingProgramMeta?.name} contract
</Button>
</Popover>
}
{stakingProgram === StakingProgram.Beta && (
<Button
Expand Down

0 comments on commit b3d4356

Please sign in to comment.