-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feat/price-changes
- Loading branch information
Showing
53 changed files
with
1,743 additions
and
801 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@talismn/chaindata-provider": patch | ||
--- | ||
|
||
Update init data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@talismn/balances": minor | ||
--- | ||
|
||
subtensor hotkey in balance meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
apps/extension/src/@talisman/components/FallbackErrorBoundary.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { log } from "extension-shared" | ||
import { Component, ErrorInfo, ReactNode } from "react" | ||
|
||
interface FallbackErrorBoundaryProps { | ||
children: ReactNode | ||
fallback: ReactNode | ||
} | ||
|
||
interface FallbackErrorBoundaryState { | ||
hasError: boolean | ||
} | ||
|
||
/** | ||
* Error boundary that catches errors in its children and renders a fallback UI. | ||
* Use this if you don't want to use the Sentry error boundary. | ||
*/ | ||
export class FallbackErrorBoundary extends Component< | ||
FallbackErrorBoundaryProps, | ||
FallbackErrorBoundaryState | ||
> { | ||
constructor(props: FallbackErrorBoundaryProps) { | ||
super(props) | ||
this.state = { hasError: false } | ||
} | ||
|
||
static getDerivedStateFromError(_: Error): FallbackErrorBoundaryState { | ||
// Update state so the next render will show the fallback UI. | ||
return { hasError: true } | ||
} | ||
|
||
componentDidCatch(error: Error, info: ErrorInfo): void { | ||
log.warn("FallbackErrorBoundary caught an error", { error, info }) | ||
} | ||
|
||
render() { | ||
if (this.state.hasError) { | ||
// Render the provided fallback UI | ||
return this.props.fallback | ||
} | ||
|
||
return this.props.children | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.