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

Update WASM crate to point to SHA of core that includes correct middleware #1074

Merged

Conversation

jessepinho
Copy link
Contributor

@jessepinho jessepinho commented May 8, 2024

Core was previously missing a necessary middleware for its auction endpoint. As a result, calls to that endpoint would fail due to a missing trailer.

This was recently fixed, so this PR points the WASM crate to the SHA that fixed that issue, so that calls to get the latest auction state from the fullnode will succeed.

This PR also addresses a couple typings changes from core that resulted from the update.

@jessepinho jessepinho force-pushed the jessepinho/auctions-query-latest-state-fix-web-980 branch from 060e5fc to 7dae064 Compare May 8, 2024 19:34
@@ -91,7 +91,7 @@ impl ActionList {
}

fn fee_estimate(&self, gas_prices: &GasPrices, fee_tier: &FeeTier) -> Fee {
let base_fee = Fee::from_staking_token_amount(gas_prices.fee(&self.gas_estimate()));
let base_fee = gas_prices.fee(&self.gas_estimate());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

GasPrices::fee() now returns a Fee instead of an Amount. I figured Fee::from_staking_token_amount() isn't needed, since the fee from a GasPrices should always be in the staking token.

Copy link
Contributor

Choose a reason for hiding this comment

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

planner logic will need to change again, so that's alright

@@ -538,14 +538,14 @@ pub async fn plan_transaction(
};

if let Some(pb_memo_plaintext) = request.memo {
plan.memo = Some(MemoPlan::new(&mut OsRng, pb_memo_plaintext.try_into()?)?);
plan.memo = Some(MemoPlan::new(&mut OsRng, pb_memo_plaintext.try_into()?));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Getting rid of the final ? since it's no longer needed

@jessepinho jessepinho force-pushed the jessepinho/auctions-query-latest-state-fix-web-980 branch from 7dae064 to b8f7b14 Compare May 8, 2024 19:42
@jessepinho jessepinho force-pushed the jessepinho/auctions-query-latest-state-fix-web-980 branch from b8f7b14 to 8fe0958 Compare May 8, 2024 19:44
}
for action in self.change_outputs.values() {
// TODO missing AddAssign
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jessepinho jessepinho marked this pull request as ready for review May 8, 2024 19:52
@erwanor
Copy link
Member

erwanor commented May 9, 2024

We're doing a tagged release today and will bump the auction protos to v1 so this is great preliminary work towards that

@jessepinho jessepinho merged commit 65efc65 into main May 9, 2024
6 checks passed
@jessepinho jessepinho deleted the jessepinho/auctions-query-latest-state-fix-web-980 branch May 9, 2024 16:27
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.

4 participants