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

chore!: restructure Account related packages #1675

Merged
merged 68 commits into from
Feb 10, 2024

Conversation

Torres-ssf
Copy link
Contributor

@Torres-ssf Torres-ssf added the chore Issue is a chore label Jan 22, 2024
@Torres-ssf Torres-ssf added this to the 2 - Beetle milestone Jan 22, 2024
@Torres-ssf Torres-ssf self-assigned this Jan 22, 2024
@Torres-ssf Torres-ssf changed the title refactor: restructure Account related packages refactor!: restructure Account related packages Jan 22, 2024
Copy link
Contributor

github-actions bot commented Jan 22, 2024

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
86.92% (+0.01% 🔼)
6133/7056
🟡 Branches
71.09% (+0.19% 🔼)
969/1363
🟡 Functions
77.96% (+0.01% 🔼)
1008/1293
🟢 Lines
86.89% (+0.01% 🔼)
5873/6759
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / assemble-transfer-to-contract-script.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / signer.ts
97.5% 75% 100% 97.5%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / hdwallet.ts
94.85% 80.39% 100% 94.79%
🟢
... / index.ts
100% 100% 50% 100%
🟢
... / mnemonic.ts
98.61% 88% 100% 98.61%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / english.ts
100% 100% 100% 100%
🟢
... / utils.ts
81.58% 56.25% 100% 80.56%
🟢
... / memory-storage.ts
100% 100% 100% 100%
🟢
... / wallet-manager.ts
100% 100% 100% 100%
🟢
... / mnemonic-vault.ts
94.29% 87.5% 100% 94.29%
🟢
... / privatekey-vault.ts
100% 100% 100% 100%
🟢
... / mnemonic-specs.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟡
... / predicate.ts
70.49% 43.75% 72.73% 70.49%
🟢
... / getPredicateRoot.ts
100% 100% 100% 100%

Test suite run success

1482 tests passing in 262 suites.

Report generated by 🧪jest coverage report action from a1ee195

@fuel-service-user fuel-service-user requested a review from a team January 25, 2024 12:53
@Torres-ssf Torres-ssf force-pushed the st/refactor/restructure-account branch from a1ee195 to ac81696 Compare January 28, 2024 20:28
@Torres-ssf Torres-ssf changed the title refactor!: restructure Account related packages chore!: restructure Account related packages Jan 28, 2024
@Torres-ssf Torres-ssf force-pushed the st/refactor/restructure-account branch from 7933f13 to c7e0c54 Compare February 6, 2024 16:01
@Torres-ssf Torres-ssf marked this pull request as ready for review February 6, 2024 17:01
danielbate
danielbate previously approved these changes Feb 8, 2024
Copy link
Contributor

@danielbate danielbate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪓

apps/docs/.vitepress/config.ts Show resolved Hide resolved
arboleya
arboleya previously approved these changes Feb 8, 2024
Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR just shows how packages' over-fragmentation bloats everything up!

Look at the defrag aftermath! 🙌 🚀

bloat

Note

I suspect we could add a accounts/src/wallet directory to contain all the wallet-realted files that are currently in the accounts/src root.

@Torres-ssf Torres-ssf dismissed stale reviews from arboleya and danielbate via fd64491 February 8, 2024 12:37
Copy link
Contributor

github-actions bot commented Feb 8, 2024

Coverage Report:

Lines Branches Functions Statements
79.83%(+1.08%) 70.31%(+1.64%) 79.19%(+1.87%) 79.88%(+1.17%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 ✨ packages/account/src/account.ts 80%
(+80%)
39.02%
(+39.02%)
89.47%
(+89.47%)
80%
(+80%)
✨ packages/account/src/configs.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/hdwallet/hdwallet.ts 94.44%
(+94.44%)
84.37%
(+84.37%)
100%
(+100%)
94.5%
(+94.5%)
🔴 ✨ packages/account/src/mnemonic/mnemonic.ts 98.48%
(+98.48%)
90.32%
(+90.32%)
100%
(+100%)
98.48%
(+98.48%)
🔴 ✨ packages/account/src/mnemonic/utils.ts 78.46%
(+78.46%)
63.63%
(+63.63%)
100%
(+100%)
79.71%
(+79.71%)
🔴 ✨ packages/account/src/predicate/predicate.ts 31.37%
(+31.37%)
25%
(+25%)
27.27%
(+27.27%)
31.37%
(+31.37%)
✨ packages/account/src/predicate/utils/getPredicateRoot.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/coin-quantity.ts 100%
(+100%)
93.75%
(+93.75%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/fuel-graphql-subscriber.ts 90%
(+90%)
62.5%
(+62.5%)
100%
(+100%)
90%
(+90%)
🔴 ✨ packages/account/src/providers/memory-cache.ts 100%
(+100%)
93.75%
(+93.75%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/provider.ts 81.36%
(+81.36%)
68.9%
(+68.9%)
86.15%
(+86.15%)
81.91%
(+81.91%)
🔴 ✨ packages/account/src/providers/resource.ts 80%
(+80%)
100%
(+100%)
25%
(+25%)
62.5%
(+62.5%)
🔴 ✨ packages/account/src/providers/generated/operations.ts 94.05%
(+94.05%)
100%
(+100%)
80.64%
(+80.64%)
94.28%
(+94.28%)
🔴 ✨ packages/account/src/providers/transaction-request/create-transaction-request.ts 58.82%
(+58.82%)
53.33%
(+53.33%)
37.5%
(+37.5%)
58.82%
(+58.82%)
🔴 ✨ packages/account/src/providers/transaction-request/errors.ts 0%
(+0%)
100%
(+100%)
0%
(+0%)
0%
(+0%)
🔴 ✨ packages/account/src/providers/transaction-request/hash-transaction.ts 61.11%
(+61.11%)
50%
(+50%)
100%
(+100%)
61.11%
(+61.11%)
🔴 ✨ packages/account/src/providers/transaction-request/input.ts 83.33%
(+83.33%)
87.5%
(+87.5%)
100%
(+100%)
83.33%
(+83.33%)
🔴 ✨ packages/account/src/providers/transaction-request/output.ts 66.66%
(+66.66%)
50%
(+50%)
100%
(+100%)
66.66%
(+66.66%)
🔴 ✨ packages/account/src/providers/transaction-request/script-transaction-request.ts 42.5%
(+42.5%)
57.14%
(+57.14%)
38.88%
(+38.88%)
41.46%
(+41.46%)
🔴 ✨ packages/account/src/providers/transaction-request/scripts.ts 75%
(+75%)
100%
(+100%)
50%
(+50%)
75%
(+75%)
🔴 ✨ packages/account/src/providers/transaction-request/storage-slot.ts 18.18%
(+18.18%)
0%
(+0%)
0%
(+0%)
18.18%
(+18.18%)
🔴 ✨ packages/account/src/providers/transaction-request/transaction-request.ts 78.46%
(+78.46%)
62.71%
(+62.71%)
82.6%
(+82.6%)
78.35%
(+78.35%)
🔴 ✨ packages/account/src/providers/transaction-request/utils.ts 87.5%
(+87.5%)
85.71%
(+85.71%)
100%
(+100%)
87.5%
(+87.5%)
✨ packages/account/src/providers/transaction-request/witness.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/transaction-response/getDecodedLogs.ts 0%
(+0%)
0%
(+0%)
0%
(+0%)
0%
(+0%)
🔴 ✨ packages/account/src/providers/transaction-response/transaction-response.ts 73.17%
(+73.17%)
43.75%
(+43.75%)
87.5%
(+87.5%)
73.17%
(+73.17%)
🔴 ✨ packages/account/src/providers/transaction-summary/assemble-transaction-summary.ts 100%
(+100%)
71.42%
(+71.42%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/transaction-summary/calculate-transaction-fee.ts 100%
(+100%)
87.5%
(+87.5%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/transaction-summary/call.ts 90.47%
(+90.47%)
50%
(+50%)
100%
(+100%)
90.47%
(+90.47%)
✨ packages/account/src/providers/transaction-summary/date.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/transaction-summary/get-transaction-summary.ts 0%
(+0%)
0%
(+0%)
0%
(+0%)
0%
(+0%)
✨ packages/account/src/providers/transaction-summary/input.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/transaction-summary/operations.ts 98.18%
(+98.18%)
81.13%
(+81.13%)
94.28%
(+94.28%)
97.39%
(+97.39%)
✨ packages/account/src/providers/transaction-summary/output.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/transaction-summary/receipt.ts 88.88%
(+88.88%)
45.45%
(+45.45%)
100%
(+100%)
88.88%
(+88.88%)
🔴 ✨ packages/account/src/providers/transaction-summary/status.ts 100%
(+100%)
90.9%
(+90.9%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/providers/transaction-summary/types.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/providers/utils/auto-retry-fetch.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/utils/block-explorer.ts 100%
(+100%)
95.65%
(+95.65%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/providers/utils/gas.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/providers/utils/json.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/providers/utils/merge-quantities.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/providers/utils/receipts.ts 94.44%
(+94.44%)
83.33%
(+83.33%)
100%
(+100%)
94.54%
(+94.54%)
✨ packages/account/src/providers/utils/sleep.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/providers/utils/time.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/signer/signer.ts 96.55%
(+96.55%)
80%
(+80%)
100%
(+100%)
96.55%
(+96.55%)
✨ packages/account/src/test-utils/generateTestWallet.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/test-utils/launchNode.ts 100%
(+100%)
88.46%
(+88.46%)
64.7%
(+64.7%)
93.4%
(+93.4%)
🔴 ✨ packages/account/src/test-utils/seedTestWallet.ts 100%
(+100%)
50%
(+50%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/utils/formatTransferToContractScriptData.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/wallet/base-wallet-unlocked.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/wallet/keystore-wallet.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/wallet/wallet.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/wallet/wallets.ts 100%
(+100%)
100%
(+100%)
87.5%
(+87.5%)
94.11%
(+94.11%)
🔴 ✨ packages/account/src/wallet-manager/types.ts 0%
(+0%)
100%
(+100%)
0%
(+0%)
0%
(+0%)
✨ packages/account/src/wallet-manager/wallet-manager.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/wallet-manager/storages/memory-storage.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/wallet-manager/vaults/mnemonic-vault.ts 93.54%
(+93.54%)
80%
(+80%)
100%
(+100%)
93.54%
(+93.54%)
✨ packages/account/src/wallet-manager/vaults/privatekey-vault.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/wordlists/index.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/wordlists/words/english.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)

@Torres-ssf Torres-ssf merged commit 357c253 into master Feb 10, 2024
15 of 16 checks passed
@Torres-ssf Torres-ssf deleted the st/refactor/restructure-account branch February 10, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account Restructure
4 participants