Skip to content

Commit

Permalink
Merge pull request #4477 from EdgeApp/paul/fixAirshipResolve
Browse files Browse the repository at this point in the history
Fix stuck showToastSpinner
  • Loading branch information
paullinator authored Sep 21, 2023
2 parents 0925e32 + 1a9f49e commit 2d66492
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- fixed: Min/max price label position on the Markets charts
- fixed: Prevent setting invalid spending limits
- fixed: Turning off 'Dark Mode' causes crash
- fixed: Stuck showToastSpinner never going away
- removed: 'Add/Edit Tokens" option for token rows

## 3.17.2 (2023-09-15)
Expand Down
4 changes: 2 additions & 2 deletions src/components/services/AirshipInstance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export function showToast(message: string, autoHideMs?: number): void {
export async function showToastSpinner<T>(message: string, activity: Promise<T>): Promise<T> {
Airship.show(bridge => {
activity.then(
() => bridge.resolve(),
() => bridge.resolve()
() => setTimeout(() => bridge.resolve(), 0),
() => setTimeout(() => bridge.resolve(), 0)
)
return (
<AirshipToast bridge={bridge} message={message} autoHideMs={0}>
Expand Down

0 comments on commit 2d66492

Please sign in to comment.