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

MOB-350 break down transactions to msg and send #132

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

johnqh
Copy link
Contributor

@johnqh johnqh commented Mar 18, 2024

This PR only breaks down existing transaction functions to two parts, one to construct the Msg and one to send the Msg.

This will enable us to send multiple Msgs in one transaction in future PR.

@@ -433,25 +469,45 @@ export class Post {
goodTilBlockTime?: number,
broadcastMode?: BroadcastMode,
) : Promise<BroadcastTxAsyncResponse | BroadcastTxSyncResponse | IndexedTx> {
const msgs: Promise<EncodeObject[]> = new Promise((resolve) => {
const msg = await this.cancelOrderMsg(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we inline this.cancelOrderMsg into the Promise.resolve(...)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jaredvu What's the best coding pattern to do that? msg is a single object, and send take a promise for multiple msgs.

@johnqh johnqh merged commit 90e7774 into main Mar 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants