Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

json config for org registration #111

Open
4meta5 opened this issue Jul 6, 2020 · 1 comment
Open

json config for org registration #111

4meta5 opened this issue Jul 6, 2020 · 1 comment

Comments

@4meta5
Copy link
Collaborator

4meta5 commented Jul 6, 2020

#110 (comment)

The CLI input format for BatchIssueShares, BatchBurnShares, and RegisterWeightedOrg is not convenient.

#[derive(Clone, Debug)]
pub struct AccountShare(pub String, pub u64);
impl FromStr for AccountShare {
    type Err = Error;

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        let coords: Vec<&str> = s.trim_matches(|p| p == '(' || p == ')' )
                                 .split(',')
                                 .collect();
        let acc_str = coords[0];
        let share_fromstr = coords[1].parse::<u64>().map_err(|_| Error::ParseIntError)?;
        Ok(AccountShare(acc_str.to_string(), share_fromstr))
    }
}

I'd prefer to use a .json file to register organizations because it's just poor usability to require the user to type out the members in the format above...

@sunshine-bors
Copy link

sunshine-bors commented Aug 17, 2020

☀️ Sunshine Submission Approved ☀️
BountyID: 2 🌻 SubmissionID: 1 🌻 Amount Received: 500 🌻 Bounty Issue

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

No branches or pull requests

2 participants