-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications and feedback on transactions #466
Notifications and feedback on transactions #466
Conversation
✅ Deploy Preview for dev-mainnet-teloscan ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for teloscan-stage ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
awesome job, works great 💯
src/antelope/mocks/AntelopeConfig.ts
Outdated
// localizationHandler: (message: string, params?: Record<string, string>) => message, | ||
// notifyFailureWithActionHandler: (message: string, action: () => void) => void 0, | ||
// notifyFailureWithAction: (message: string, params?: { label: string; handler: () => void; }) => void 0, | ||
// }; |
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.
remove commented code
src/antelope/mocks/AntelopeConfig.ts
Outdated
}; | ||
export class AntelopeConfig { | ||
// @TODO rename this method, it's used for token and NFT transfers as well | ||
wrapError(description: string, error: unknown): AntelopeError { |
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.
rename to transactionError
(I updated this in telos-wallet as part of the nft transfer PR)
src/antelope/mocks/AccountStore.ts
Outdated
|
||
return tx; | ||
} catch (error) { | ||
const trxError = ant.config.wrapError(actionError, error); |
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.
rename wrapError
to transactionError
see feedback in AntelopeConfig.ts
@Viterbo is there a reason why all the new store files are added under the 'mocks' dir instead of 'store'? |
Yes. It's because they are mocks 😆 Why did I do that? Well, because otherwise, I would need to migrate the entire library, and that would be a great effort too early in the process. The task does need to be completed, but not right now—rather, it should be done after the library is finished. |
Fixes #106
Description
This PR includes a packed solution to simplify the task of notifying the user whenever a transaction is signed and sent, succeeded or not, with a simple call to a generic signCustomTransaction function.
Test scenarios
Screen captures
Notifications-on-Teloscan.webm
Checklist: