-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Multisig V2][API] Fix the API error for Multisig V2 #12445
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -740,6 +740,8 @@ impl TryFrom<Script> for ScriptPayload { | |
// We use an enum here for extensibility so we can add Script payload support | ||
// in the future for example. | ||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Union)] | ||
#[serde(tag = "type", rename_all = "snake_case")] | ||
#[oai(one_of, discriminator_name = "type", rename_all = "snake_case")] | ||
pub enum MultisigTransactionPayload { | ||
EntryFunctionPayload(EntryFunctionPayload), | ||
} | ||
Comment on lines
742
to
747
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this affect the indexer? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bowenyang007 , @larry-aptos , we are making this change for the correct (de)serialization of simulation API results. Do you think this would affect the indexer? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't believe this affects indexer, we have our own layer to convert the API types into proto types and this doesn't leverage the JSON representation of the types from serde. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the clarification! |
||
|
@@ -751,6 +753,8 @@ pub struct MultisigPayload { | |
pub multisig_address: Address, | ||
|
||
// Transaction payload is optional if already stored on chain. | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
#[serde(default)] | ||
pub transaction_payload: Option<MultisigTransactionPayload>, | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
import type { EntryFunctionPayload } from './EntryFunctionPayload'; | ||
|
||
export type MultisigTransactionPayload_EntryFunctionPayload = ({ | ||
type: string; | ||
} & EntryFunctionPayload); | ||
|
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.
@banool , does this line for oai look good to you?
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.
Yeah looks good.