Skip to content
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

Cannot fetch Mint transactions through Provider #1199

Closed
VitalyV1337 opened this issue Nov 9, 2023 · 0 comments · Fixed by #1203
Closed

Cannot fetch Mint transactions through Provider #1199

VitalyV1337 opened this issue Nov 9, 2023 · 0 comments · Fixed by #1203
Assignees
Labels
bug Something isn't working

Comments

@VitalyV1337
Copy link

In fuels-core/src/types/wrappers/transaction_response.rs

 let transaction = match client_response.transaction {
            Transaction::Script(tx) => TransactionType::Script(ScriptTransaction::from(tx)),
            Transaction::Create(tx) => TransactionType::Create(CreateTransaction::from(tx)),
            Transaction::Mint(_) => unimplemented!(),
        };

unimplemented!() will cause the entire function to panic, None should be returned instead.

@segfault-magnet segfault-magnet changed the title Transaction Response should be Optional since Mint is not implemented. Cannot fetch Mint transactions through Provider Nov 14, 2023
@segfault-magnet segfault-magnet self-assigned this Nov 14, 2023
@segfault-magnet segfault-magnet added the bug Something isn't working label Nov 14, 2023
digorithm pushed a commit that referenced this issue Nov 17, 2023
closes #1199 

Mint transactions can now be fetched through the `Provider`. Implemented
what made sense for `Mint`, left the rest as `unimplemented!`. Without
some hefty redesign don't see what other option is there but to violate
the LSP (L for Liskov).

Decided to wrap `Mint`, so that users may extract the id, outputs, etc,
without having to know about the various traits from fuel.

### Checklist
- [x] I have linked to any relevant issues.
- [ ] I have updated the documentation.
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added necessary labels.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants