-
Notifications
You must be signed in to change notification settings - Fork 64
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: Fixed cli command for memo parameter #446
base: main
Are you sure you want to change the base?
Conversation
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.
@race-of-sloths score 5
hey, few comments
@@ -61,14 +57,6 @@ impl AmountFtContext { | |||
ft_contract_account_id: previous_context.ft_contract_account_id, | |||
receiver_account_id: previous_context.receiver_account_id, | |||
ft_transfer_amount, | |||
memo: scope.memo.as_ref().and_then(|s| { |
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.
I would prefer this to be honest, over custom type that is not needed yet in the end.
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.
Done
src/types/optional_string.rs
Outdated
@@ -0,0 +1,41 @@ | |||
#[derive(Debug, Default, Clone)] |
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.
Do we really need this type? I think, it's a bit weird
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.
Deleted
@FroVolod Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: waiting for merge
Your contribution is much appreciated with a final score of 5! @akorchyn received 25 Sloth Points for reviewing and scoring this pull request. 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
|
src/commands/tokens/send_ft/mod.rs
Outdated
deposit: &crate::types::near_token::NearToken, | ||
gas: &crate::common::NearGas, | ||
) -> color_eyre::eyre::Result<crate::commands::PrepopulatedTransaction> { | ||
let mut transfer_args = serde_json::Map::new(); |
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.
I think you can just
serde_json::json! {
receiver_id: receiver_account_id,
memo: memo.and(...)
amount: ...
}
Would be easier to read
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.
Done
This fixed the command:
to:
or