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

Invalid Parameters returned from AccountTxRequest callout #28

Open
JoeyGii opened this issue Oct 9, 2023 · 5 comments
Open

Invalid Parameters returned from AccountTxRequest callout #28

JoeyGii opened this issue Oct 9, 2023 · 5 comments

Comments

@JoeyGii
Copy link

JoeyGii commented Oct 9, 2023

Thanks for doing this SDK. I've had great success with it. I had to redo the signing aspect for submitting payments, but other than that smooth sailing.

However, the above struct seems to be a little wonky. I get an invalidParameters response from it.

When I made my own struct and implemented your Request trait I had a successful response.

@gmosx
Copy link
Owner

gmosx commented Oct 26, 2023

Re signing payments, any chance you could submit a PR?

Same for AccountTxRequest?

That would be greatly appreciated.

@tinkrtailor
Copy link
Contributor

@JoeyGii What did the struct you made look like? Wondering if we can spot the difference and update the library accordingly

@JoeyGii
Copy link
Author

JoeyGii commented Oct 29, 2023

pub struct AccountTxsRequest {
    account: String,
    binary: bool,
    forward: bool,
    ledger_index_max: i64,
    ledger_index_min: i64,
    limit: u64,
}

I got it working with the above by using the xrpl documentation. @gunnigylfa

@JoeyGii
Copy link
Author

JoeyGii commented Oct 29, 2023

I also used these defaults:

impl AccountTxsRequest {
    pub fn new(account: &str) -> AccountTxsRequest {
        AccountTxsRequest {
            account: account.into(),
            binary: false,
            forward: false,
            ledger_index_max: -1,
            ledger_index_min: -1,
            limit: 5,
        }
    }
}

@tinkrtailor
Copy link
Contributor

Thanks for sharing this. FWIW the AccountTxsRequest is working without modifications in my applications.

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

No branches or pull requests

3 participants