fix: Fixed offline mode#593
Conversation
|
@FroVolod Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: executed
Your contribution is much appreciated with a final score of 5! @r-near received 25 Sloth Points for reviewing and scoring this pull request. Another weekly streak completed, well done @FroVolod! To keep your weekly streak and get another bonus make pull request next week! Looking forward to see you in race-of-sloths What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
There was a problem hiding this comment.
Pull request overview
This PR aims to make offline mode usable for transaction preparation paths by avoiding network calls where possible and preventing direct submission while offline.
Changes:
- Blocks sending transactions when
--offlineis enabled. - Adds cached/offline handling for FT transfer and FT transfer call flows.
- Updates staking validator input and contract function prompts to avoid online lookups in offline mode.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/transaction_signature_options/send/mod.rs |
Prevents broadcasting transactions in offline mode. |
src/common.rs |
Adjusts staking validator input for offline mode and updates FT contract list helpers. |
src/commands/transaction/print_transaction/mod.rs |
Corrects documentation for printing signed transactions. |
src/commands/tokens/send_ft/mod.rs |
Adds offline FT contract lookup and skips online storage checks. |
src/commands/tokens/send_ft/amount_ft.rs |
Handles FT amount constraints when offline. |
src/commands/tokens/send_ft_call/mod.rs |
Adds offline FT contract lookup and skips online storage checks for FT calls. |
src/commands/tokens/send_ft_call/amount_ft.rs |
Handles FT call amount constraints when offline. |
src/commands/staking/delegate/withdraw.rs |
Passes global context to validator input. |
src/commands/staking/delegate/withdraw_all.rs |
Passes global context to validator input. |
src/commands/staking/delegate/view_balance.rs |
Passes global context to validator input. |
src/commands/staking/delegate/unstake.rs |
Passes global context to validator input. |
src/commands/staking/delegate/unstake_all.rs |
Passes global context to validator input. |
src/commands/staking/delegate/stake.rs |
Passes global context to validator input. |
src/commands/staking/delegate/stake_all.rs |
Passes global context to validator input. |
src/commands/staking/delegate/deposit_and_stake.rs |
Passes global context to validator input. |
src/commands/contract/call_function/mod.rs |
Avoids ABI lookup for function-name prompts in offline mode. |
Comments suppressed due to low confidence (2)
src/commands/tokens/send_ft/mod.rs:237
- Correct the typo in the warning text:
ft-contratshould beft-contract.
src/commands/tokens/send_ft_call/mod.rs:190 - Correct the typo in the warning text:
ft-contratshould beft-contract.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
|
🥁 Score it! @r-near, please score the PR with |
|
@race-of-sloths score 5 |
No description provided.