Skip to content

Commit b5a1876

Browse files
committed
fix(perps): move PerpsAlwaysOnProvider inside ErrorBoundary
PerpsAlwaysOnProvider was wrapping ErrorBoundary, so a synchronous render error in its useSelector call would bypass the wallet error boundary and crash the app. Swapping the nesting order ensures any render error in PerpsAlwaysOnProvider is caught by the wallet boundary, consistent with the stated goal that a perps failure cannot block the rest of the app.
1 parent 2037d4a commit b5a1876

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/components/Views/Wallet/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,8 +1441,8 @@ const Wallet = ({
14411441
);
14421442

14431443
return (
1444-
<PerpsAlwaysOnProvider>
1445-
<ErrorBoundary navigation={navigation} view="Wallet">
1444+
<ErrorBoundary navigation={navigation} view="Wallet">
1445+
<PerpsAlwaysOnProvider>
14461446
<View style={baseStyles.flexGrow}>
14471447
{selectedInternalAccount ? (
14481448
<View
@@ -1507,8 +1507,8 @@ const Wallet = ({
15071507
renderLoader()
15081508
)}
15091509
</View>
1510-
</ErrorBoundary>
1511-
</PerpsAlwaysOnProvider>
1510+
</PerpsAlwaysOnProvider>
1511+
</ErrorBoundary>
15121512
);
15131513
};
15141514

0 commit comments

Comments
 (0)