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

feat: added the state to the transaction request #3709

Conversation

petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Feb 14, 2025

Summary

  • Introduce the state field on a transaction request ('funded', 'signed') to enable underlying connectors to skip certain steps based upon this state to reduce HTTP requests.
 interface SendTransactionJsonRpc {
    state: undefined | 'funded' | 'immutable',
  }
State Description
undefined The transaction has not been estimated or funded.
funded The transaction is estimated and funded, the underlying wallet can skip this process.
signed The transaction is signed (therefore, estimated and funded). This is the same as skipCustomFee.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

@petertonysmith94 petertonysmith94 added the feat Issue is a feature label Feb 14, 2025
@petertonysmith94 petertonysmith94 self-assigned this Feb 14, 2025
Copy link

vercel bot commented Feb 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 0:26am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 0:26am
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 0:26am

@petertonysmith94 petertonysmith94 changed the title feat: implement flags for the transaction request feat: status flags for the transaction request Feb 17, 2025
@petertonysmith94 petertonysmith94 changed the title feat: status flags for the transaction request feat: added the state of a transaction request Feb 24, 2025
@petertonysmith94 petertonysmith94 changed the title feat: added the state of a transaction request feat: added the state to the transaction request Feb 24, 2025
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
77.21%(+0.06%) 70.9%(+0.21%) 75.26%(-0.04%) 77.2%(+0.05%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 ✨ packages/abi-coder/src/utils/scriptData.ts 0%
(+0%)
0%
(+0%)
0%
(+0%)
0%
(+0%)
🔴 packages/account/src/account.ts 82.72%
(+2.14%)
73.17%
(+1.94%)
82.92%
(+0.42%)
82.47%
(+2.13%)
🔴 packages/account/src/connectors/fuel-connector.ts 30%
(+1.43%)
100%
(+0%)
4.54%
(-0.22%)
30%
(+1.43%)
🔴 packages/account/src/connectors/fuel.ts 96.75%
(+0.02%)
90.66%
(+0%)
93.33%
(+0%)
96.87%
(+0.02%)
🔴 packages/account/src/providers/provider.ts 67.53%
(+0.58%)
59.8%
(+2.73%)
68.04%
(+0%)
67.29%
(+0.56%)
🔴 packages/account/src/providers/transaction-request/transaction-request.ts 88.96%
(+0.39%)
78.66%
(+0.58%)
84.31%
(+0.31%)
89.18%
(+0.37%)
🔴 packages/errors/src/test-utils/expect-to-throw-fuel-error.ts 91.66%
(-0.34%)
88.88%
(+0%)
100%
(+0%)
91.66%
(-0.34%)

@petertonysmith94 petertonysmith94 marked this pull request as ready for review February 24, 2025 13:02
@petertonysmith94 petertonysmith94 changed the base branch from master to ps/feat/improved-sdk-wallet-communication February 24, 2025 13:04
@petertonysmith94 petertonysmith94 merged commit f75c4ce into ps/feat/improved-sdk-wallet-communication Feb 24, 2025
31 checks passed
@petertonysmith94 petertonysmith94 deleted the ps/feat/enable-eliminatation-of-wallet-transaction-requests branch February 24, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants