Skip to content

Commit 3762a66

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/update-tooltip-celo
2 parents af382ac + 6fdfb96 commit 3762a66

22 files changed

+136
-33
lines changed

src/components/transactions/Bridge/BridgeModalContent.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ export const BridgeModalContent = () => {
333333
</Box>
334334

335335
<ChangeNetworkWarning
336+
autoSwitchOnMount={true}
336337
networkName={getNetworkConfig(sourceNetworkObj.chainId).name}
337338
chainId={sourceNetworkObj.chainId}
338339
event={{

src/components/transactions/ClaimRewards/ClaimRewardsModalContent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ export const ClaimRewardsModalContent = ({ user, reserves }: ClaimRewardsModalCo
152152
<>
153153
<TxModalTitle title="Claim rewards" />
154154
{isWrongNetwork && !readOnlyModeAddress && (
155-
<ChangeNetworkWarning networkName={networkConfig.name} chainId={currentChainId} />
155+
<ChangeNetworkWarning
156+
autoSwitchOnMount={true}
157+
networkName={networkConfig.name}
158+
chainId={currentChainId}
159+
/>
156160
)}
157161

158162
{blockingError !== undefined && (

src/components/transactions/Emode/EmodeModalContent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ export const EmodeModalContent = ({ user }: { user: ExtendedFormattedUser }) =>
181181
<>
182182
<TxModalTitle title={<Trans>Manage E-Mode</Trans>} />
183183
{isWrongNetwork && !readOnlyModeAddress && (
184-
<ChangeNetworkWarning networkName={networkConfig.name} chainId={currentChainId} />
184+
<ChangeNetworkWarning
185+
autoSwitchOnMount={true}
186+
networkName={networkConfig.name}
187+
chainId={currentChainId}
188+
/>
185189
)}
186190

187191
<Typography variant="caption">

src/components/transactions/FlowCommons/ModalWrapper.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export const ModalWrapper: React.FC<{
8484
)}
8585
{isWrongNetwork && !readOnlyModeAddress && (
8686
<ChangeNetworkWarning
87+
autoSwitchOnMount={true}
8788
networkName={getNetworkConfig(requiredChainId).name}
8889
chainId={requiredChainId}
8990
event={{

src/components/transactions/GovDelegation/GovDelegationModalContent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ export const GovDelegationModalContent: React.FC<GovDelegationModalContentProps>
153153
<>
154154
<TxModalTitle title={isRevokeModal ? 'Revoke power' : 'Set up delegation'} />
155155
{isWrongNetwork && !readOnlyModeAddress && (
156-
<ChangeNetworkWarning networkName={networkConfig.name} chainId={govChain} />
156+
<ChangeNetworkWarning
157+
autoSwitchOnMount={true}
158+
networkName={networkConfig.name}
159+
chainId={govChain}
160+
/>
157161
)}
158162
{(isRevokeModal &&
159163
!!powers &&

src/components/transactions/GovRepresentatives/GovRepresentativesModalContent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ export const GovRepresentativesContent = ({
9696
<TxModalTitle title="Edit address" />
9797
</Box>
9898
{isWrongNetwork && !readOnlyModeAddress && (
99-
<ChangeNetworkWarning networkName={networkConfig.name} chainId={govChain} />
99+
<ChangeNetworkWarning
100+
autoSwitchOnMount={true}
101+
networkName={networkConfig.name}
102+
chainId={govChain}
103+
/>
100104
)}
101105
<Stack direction="column" gap={2}>
102106
{reps.map((r, i) => (

src/components/transactions/GovVote/GovVoteModalContent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ export const GovVoteModalContent = ({
104104
<>
105105
<TxModalTitle title="Governance vote" />
106106
{isWrongNetwork && !readOnlyModeAddress && (
107-
<ChangeNetworkWarning networkName={networkConfig.name} chainId={proposalVotingChain} />
107+
<ChangeNetworkWarning
108+
autoSwitchOnMount={true}
109+
networkName={networkConfig.name}
110+
chainId={proposalVotingChain}
111+
/>
108112
)}
109113
{blockingError !== undefined && (
110114
<Typography variant="helperText" color="red">

src/components/transactions/MigrateV3/MigrateV3ModalContent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ export const MigrateV3ModalContent = ({
136136
<>
137137
<TxModalTitle title="Migrate to V3" />
138138
{isWrongNetwork && !readOnlyModeAddress && (
139-
<ChangeNetworkWarning networkName={networkConfig.name} chainId={currentChainId} />
139+
<ChangeNetworkWarning
140+
autoSwitchOnMount={true}
141+
networkName={networkConfig.name}
142+
chainId={currentChainId}
143+
/>
140144
)}
141145

142146
<TxModalDetails gasLimit={gasLimit}>

src/components/transactions/Stake/StakeModalContent.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export const StakeModalContent = ({ stakeAssetName, icon }: StakeProps) => {
108108
networkName={networkConfig.name}
109109
chainId={stakingChain}
110110
funnel={'Stake Modal'}
111+
autoSwitchOnMount={true}
111112
/>
112113
)}
113114

src/components/transactions/StakeCooldown/StakeCooldownModalContent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ export const StakeCooldownModalContent = ({ stakeAssetName, icon }: StakeCooldow
155155
<>
156156
<TxModalTitle title="Cooldown to unstake" />
157157
{isWrongNetwork && !readOnlyModeAddress && (
158-
<ChangeNetworkWarning networkName={networkConfig.name} chainId={stakingChain} />
158+
<ChangeNetworkWarning
159+
autoSwitchOnMount={true}
160+
networkName={networkConfig.name}
161+
chainId={stakingChain}
162+
/>
159163
)}
160164
<Typography variant="description" sx={{ mb: 6 }}>
161165
<Trans>

0 commit comments

Comments
 (0)