-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* pass error keep the UI classes unchanged * make error param optional * revert ui changes * define error code on * cleanup * revert ts-ignore changes - will address them on a separate pr * fix:prettier * error response * Revert "error response" This reverts commit 2ba022d. * define TransactionError * backward compatibility * define WalletUIError * any => unknown * lint * restricting param type
- Loading branch information
Showing
5 changed files
with
77 additions
and
67 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export class WalletUIError extends Error { | ||
private constructor(readonly message: string, readonly errorCode?: number) { | ||
super(message); | ||
} | ||
|
||
static UserRejectedRequest = new WalletUIError("User rejected request"); | ||
|
||
static SwitchEthereumChainUnsupportedChainId = new WalletUIError( | ||
"Unsupported chainId", | ||
4902 | ||
); | ||
} |
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