-
Notifications
You must be signed in to change notification settings - Fork 10
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
Rename to *_trade_pubkey in smallorder struct #75
Conversation
SmallOrder is used to show information to users we are not sending identity keys anymore
WalkthroughThis pull request introduces minor updates to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/order.rs (1)
238-239
: Retain clarity by adding doc comments.Fields "buyer_trade_pubkey" and "seller_trade_pubkey" are newly introduced. Consider adding short doc comments explaining how these trade public keys differ from traditional identity keys, thus reinforcing their purpose for future contributors.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Cargo.toml
(1 hunks)src/order.rs
(3 hunks)
✅ Files skipped from review due to trivial changes (1)
- Cargo.toml
🔇 Additional comments (2)
src/order.rs (2)
194-196
: Rename fields match the PR objective.
Renaming "master_buyer_pubkey" and "master_seller_pubkey" to "buyer_trade_pubkey" and "seller_trade_pubkey" aligns perfectly with the PR objective of removing references to identity keys. This is a straightforward and logical improvement in naming consistency.
219-220
: Ensure external references are updated to match new parameter names.
These new parameter names in the constructor are consistent, but please verify that all invocations of the constructor throughout the codebase are updated. This helps avoid any compilation or runtime errors caused by mismatch.
✅ Verification successful
Let me check the constructor definition to verify the parameter order and names.
No issues found with constructor parameter usage
Looking at the constructor invocations and its definition, all existing usages in the codebase are passing only the first 5 parameters (id, kind, status, amount, fiat_code) while the remaining parameters are using their default values through the struct initialization. The new parameters buyer_trade_pubkey
and seller_trade_pubkey
are optional and added at the end of the parameter list, maintaining backward compatibility with existing calls.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search constructor usages of `SmallOrder::new` to ensure they match the new parameter names.
rg -A 5 "SmallOrder::new"
Length of output: 881
Script:
#!/bin/bash
# Get the constructor definition of SmallOrder::new
ast-grep --pattern 'impl SmallOrder {
$$$
pub fn new($$$) -> Self {
$$$
}
$$$
}'
Length of output: 3175
SmallOrder is used to show information to users
we are not sending identity keys anymore
Summary by CodeRabbit
New Features
0.6.20
.Bug Fixes
SmallOrder
struct for clarity:master_buyer_pubkey
is nowbuyer_trade_pubkey
.master_seller_pubkey
is nowseller_trade_pubkey
.