-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Hugo Marques <[email protected]>
- Loading branch information
1 parent
75b4d5f
commit b5f254b
Showing
7 changed files
with
34 additions
and
11 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,17 @@ | ||
import { toast } from '../components/Toaster/Toaster'; | ||
|
||
export const handleKnownErrors = (error: any, defaultError: any) => { | ||
const errorMessage = error.toString().toLowerCase(); | ||
|
||
if (errorMessage.includes('insufficient funds')) { | ||
toast.error( | ||
`You don't have enough balance to complete the transaction. Please fund your wallet with some cUSD to complete the transaction.` | ||
); | ||
} | ||
|
||
if (errorMessage.includes('exceeds the configured cap')) { | ||
toast.error(`Tx fee exceeds the configured cap`); | ||
} | ||
|
||
toast.error(defaultError); | ||
}; |
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
b5f254b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
web – ./
web-git-production-ipct.vercel.app
www.impactmarket.com
impactmarket.com
web-ipct.vercel.app