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

Support orders in the wallet #1823

Open
wants to merge 11 commits into
base: fill_order_with_amount
Choose a base branch
from

Conversation

azarovh
Copy link
Member

@azarovh azarovh commented Oct 4, 2024

No description provided.

chainstate/types/src/error.rs Outdated Show resolved Hide resolved
wallet/src/account/utxo_selector/mod.rs Outdated Show resolved Hide resolved
wallet/wallet-rpc-lib/src/rpc/interface.rs Outdated Show resolved Hide resolved
wallet/src/account/mod.rs Outdated Show resolved Hide resolved
orders-accounting/src/price_calculation.rs Outdated Show resolved Hide resolved
wallet/src/account/mod.rs Outdated Show resolved Hide resolved
wallet/src/wallet/mod.rs Outdated Show resolved Hide resolved
wallet/wallet-rpc-client/src/rpc_client/client_impl.rs Outdated Show resolved Hide resolved
common/src/chain/order/rpc.rs Outdated Show resolved Hide resolved
common/src/chain/order/rpc.rs Outdated Show resolved Hide resolved
/// The fields represent currencies and amounts to be exchanged and the trading pair can be deducted from it.
#[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, serde::Serialize, serde::Deserialize)]
pub struct OrderData {
/// The key that can authorize conclusion of an order
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be good to explain here what concluding an order will result into, for anyone reading this.

@@ -2189,67 +2366,118 @@ fn group_preselected_inputs(
| TxOutput::CreateDelegationId(_, _)
| TxOutput::DelegateStaking(_, _)
| TxOutput::IssueFungibleToken(_)
| TxOutput::DataDeposit(_) => {
| TxOutput::DataDeposit(_)
| TxOutput::AnyoneCanTake(_) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would CreateOrder be a better name than AnyoneCanTake?

@@ -2132,7 +2308,8 @@ fn group_preselected_inputs(
chain_config: &ChainConfig,
block_height: BlockHeight,
dest_info_provider: Option<&dyn DestinationInfoProvider>,
) -> Result<BTreeMap<currency_grouper::Currency, (Amount, Amount)>, WalletError> {
order_info: Option<&RpcOrderInfo>,
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be a map <OrderId, &RpcOrderInfo> just in case to know that the order info is for the order from the inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants