-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix Informational Issues #385
Conversation
@@ -21,13 +20,13 @@ mod system; | |||
|
|||
mod issue; | |||
pub mod oracle; | |||
mod requests; |
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.
mod requests
replaces mod execution
. It splits the old execution.rs into 3:
- execution.rs
- helper.rs
- structs.rs
@@ -152,14 +193,45 @@ pub struct TransactionResponse { | |||
pub memo: Option<Vec<u8>>, | |||
} | |||
|
|||
impl Debug for TransactionResponse { |
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.
the simple derive debug
prints the value of the fields in Vec<u8>
. Converting them to a readable string will make it easier when we want to view the xdr.
@@ -6,7 +6,9 @@ name = "vault" | |||
version = "0.0.1" | |||
|
|||
[features] | |||
integration = [] | |||
integration = [ | |||
"wallet/testing-utils" |
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.
see fn listen_for_new_transactions(...)
in clients/wallet/src/horizon/horizon.rs
// and are just waiting to be executed on the parachain | ||
spawn_tasks_to_execute_open_requests_async( | ||
&mut open_requests, | ||
wallet, |
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.
Now that I look and compare this call to spawn_tasks_to_execute_open_requests_async
to spawn_tasks_to_pay_and_execute_open_requests
, it's striking that one of these functions is passing the vault_id_manager
and the other is just using the wallet
.
This reveals a potential logical flaw because, although at the moment all the vaults that simultaneously live in the same vault client use the same Stellar wallet, this could change in the future and then we miss fetching the wallet per vault in this function. I think we shouldn't even pass a wallet
parameter to the execute_open_requests
function in the first place. It should be enough to pass the vault_id_manager
like we do already and then iterating over all registered vaults with vault_id_manager.get_entries()
, accessing their stored StellarWallet
(in the spawn_tasks_to_execute_open_requests_async
function).
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.
good idea. I would prefer a new issue ticket for this.
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.
Good point. I'll create a follow-up
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.
Created the follow-up here.
1ea31da
to
29669e2
Compare
…efactoring; partial of STL-03 | Lack of Validation for `destination_address` on `send_payment_to_address()`
…ob/16203688884#step:9:144
…unction - Refactoring (#388) * 9B2-04 | Logic Should be Moved To an Separate Function - Refactoring - partial * 9B2-04 | Logic Should be Moved To an Separate Function - Refactoring - for System's fn run_service() * 9B2-04 | Logic Should be Moved To an Separate Function - Refactoring - fix from previous commit * remove stray log * remove extra space * https://github.com/pendulum-chain/spacewalk/pull/388/files#r1312732850, #388 (comment)
* IML-01 | Same Behavior Defined For Different Conditions * LI7-05 | Mismatch in Variable Name and Pallet Name * 9B2-02 | Inconsistent Comments * PRF-01 | Unhandled Error * LIH-03 | Values Length Not Validated in `feed_values` Function * CLI-01 | Confusing Function Naming * CLI-03 | Incorrect Error Type Thrown partial * CLI-03 | Incorrect Error Type Thrown * #390 (comment), #390 (comment), #390 (comment), #390 (comment), #390 (comment), https://github.com/pendulum-chain/spacewalk/actions/runs/6048709746/job/16414585252?pr=390#step:12:38 * https://github.com/pendulum-chain/spacewalk/actions/runs/6069946336/job/16465120232?pr=390#step:11:1573 * fix rustfmt error: https://github.com/pendulum-chain/spacewalk/actions/runs/6072497871/job/16472578544?pr=390
a2d08ac
to
8e58b63
Compare
* partial of 9B2-04 | Logic Should be Moved To an Separate Function - Refactoring; partial of STL-03 | Lack of Validation for `destination_address` on `send_payment_to_address()` * 257 FIx Informational Issues - Logic Should be Moved To an Separate Function - Refactoring (#388) * 9B2-04 | Logic Should be Moved To an Separate Function - Refactoring - partial * 9B2-04 | Logic Should be Moved To an Separate Function - Refactoring - for System's fn run_service() * 9B2-04 | Logic Should be Moved To an Separate Function - Refactoring - fix from previous commit * remove stray log * remove extra space * https://github.com/pendulum-chain/spacewalk/pull/388/files#r1312732850, #388 (comment) * 257 Fix informational issues part 3 (#390) * IML-01 | Same Behavior Defined For Different Conditions * LI7-05 | Mismatch in Variable Name and Pallet Name * 9B2-02 | Inconsistent Comments * PRF-01 | Unhandled Error * LIH-03 | Values Length Not Validated in `feed_values` Function * CLI-01 | Confusing Function Naming * CLI-03 | Incorrect Error Type Thrown partial * CLI-03 | Incorrect Error Type Thrown * #390 (comment), #390 (comment), #390 (comment), #390 (comment), #390 (comment), https://github.com/pendulum-chain/spacewalk/actions/runs/6048709746/job/16414585252?pr=390#step:12:38 * https://github.com/pendulum-chain/spacewalk/actions/runs/6069946336/job/16465120232?pr=390#step:11:1573 * fix rustfmt error: https://github.com/pendulum-chain/spacewalk/actions/runs/6072497871/job/16472578544?pr=390 * CLI-01 | Confusing Function Naming * #390 (comment), #390 (comment), #390 (comment), #390 (comment), #390 (comment), https://github.com/pendulum-chain/spacewalk/actions/runs/6048709746/job/16414585252?pr=390#step:12:38 * STL-02 | Code Duplication * SRC-01 | Unused Methods and Storage * 9B2-05 | Commented Out Code (partial) * LBC-03 | Inconsistent `match` Expression * LIY-03 | Reduce Using `unwrap()` and `expect()` in Production Codebase * TYL-01 | Confusing Variable Naming * put back the removed dependencies * https://github.com/pendulum-chain/spacewalk/actions/runs/6095148657/job/16538119439?pr=393#step:11:91 * https://github.com/pendulum-chain/spacewalk/actions/runs/6096401270/job/16541879632#step:11:93 * https://github.com/pendulum-chain/spacewalk/actions/runs/6096401270/job/16541879632#step:11:93 * https://github.com/pendulum-chain/spacewalk/actions/runs/6097368982/job/16544863469?pr=393#step:11:94 * https://github.com/pendulum-chain/spacewalk/actions/runs/6098205449/job/16547533143?pr=393#step:13:19 * #393 (comment), partly #393 (review) * #393 (comment) * #393 (comment), #393 (review) for vault * #393 (comment) * fix https://github.com/pendulum-chain/spacewalk/actions/runs/6263576242/job/17008273208?pr=393#step:12:894 * https://github.com/pendulum-chain/spacewalk/actions/runs/6272775696/job/17034964214?pr=393#step:12:434 * https://github.com/pendulum-chain/spacewalk/actions/runs/6275148901/job/17041998689?pr=393#step:12:587 * https://github.com/pendulum-chain/spacewalk/actions/runs/6276542346/job/17091576766#step:12:476 * #393 (comment) * #393 (comment) and fix rebase * 401 fix issues of connecting to stellar overlay network on testnet (#414) * a 3rd try of #409 * cargo fmt and fix warnings in https://github.com/pendulum-chain/spacewalk/actions/runs/6459806136/job/17536291785?pr=414 * update the `substrate-stellar-sdk` version * #414 (comment), #414 (comment), #414 (comment), #414 (comment) * LIL-01 Dead Code in execute_replace() LIT-03 Panic can happen between correlated storage modifications * LIL-01 Dead Code in execute_replace() add back the comment
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.
LGTM. We really need to create a follow-up ticket to clean up the code that is commented out though
…ob/17610217546?pr=385#step:12:560
…ob/17629635299?pr=385#step:11:58
We tested all the commands of the workflow locally and it works fine. I don't want to wait for the CI jobs to finish again so we merge this right away. |
closes for #257
This PR addresses the ff. items:
SYT-03 | Unnecessary Variable
from audit:
files covered:
SRL-01 | Usage of Hard-coded Strings
from audit:
files covered:
PAL-03 | Usage of Magic Numbers
from audit:
files covered:
PAL-02 | Unnecessary Result<...> Return Type
from audit:
files covered:
CLI-02 | Typos
from audit:
files covered:
9B2-03 | Unused Errors
from audit:
files covered:
9B2-04 | Logic Should be Moved To an Separate Function - Refactoring (partial)
from audit:
files covered:
STL-03 | Lack of Validation for
destination_address
onsend_payment_to_address()
(partial)from audit:
files covered:
testing-utils
.additional PRs: