Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Added OrderInstructions message #268

Merged
merged 7 commits into from
Aug 8, 2024
Merged

Conversation

thehenrytsai
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Aug 7, 2024

🦋 Changeset detected

Latest commit: 5358454

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@tbdex/protocol Minor
@tbdex/http-client Minor
@tbdex/http-server Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Aug 7, 2024

TBDocs Report

✅ No errors or warnings

@tbdex/protocol

  • Project entry file: packages/protocol/src/main.ts

@tbdex/http-client

  • Project entry file: packages/http-client/src/main.ts

@tbdex/http-server

  • Project entry file: packages/http-server/src/main.ts

TBDocs Report Updated at 2024-08-08T20:02:58Z 5358454

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.88%. Comparing base (cad5c4e) to head (ff61129).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
+ Coverage   95.77%   95.88%   +0.11%     
==========================================
  Files          42       43       +1     
  Lines        3528     3623      +95     
  Branches      387      395       +8     
==========================================
+ Hits         3379     3474      +95     
  Misses        149      149              
Components Coverage Δ
protocol 95.22% <100.00%> (+0.22%) ⬆️
http-client 100.00% <ø> (ø)
http-server 94.67% <ø> (ø)

@jiyoonie9
Copy link
Contributor

jiyoonie9 commented Aug 8, 2024

@thehenrytsai could you remove payment instructions from quote.data.payin and quote.data.payout?

https://github.com/TBD54566975/tbdex/tree/main/specs/protocol#quote

edit: nvm, already done in a previous PR! cad5c4e#diff-de1395c953d9e4e9cc2c952c4664703e1008d46b2d4aa9702adc0a6cadd39370L396

@@ -16,12 +16,14 @@ export type CreateOrderOptions = {
*/
export class Order extends Message {
/** a set of valid Message kinds that can come after an order */
readonly validNext = new Set<MessageKind>(['orderstatus'])
readonly validNext = new Set<MessageKind>(['orderinstructions'])
Copy link
Contributor

@jiyoonie9 jiyoonie9 Aug 8, 2024

Choose a reason for hiding this comment

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

i have these in tbdex-go for order

// ValidNext returns the valid message kinds that can follow an order.
func ValidNext() []string {
	return []string{orderstatus.Kind, closemsg.Kind, cancel.Kind}
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed.

expect(exchange.orderInstructions).to.deep.eq(orderInstructions)
})

it('cannot add Rfq, Quote, Order, OrderStatus, or Close after Order', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

technically you should be able to add a close after an order

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, will update!

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed.

Copy link
Contributor

@jiyoonie9 jiyoonie9 left a comment

Choose a reason for hiding this comment

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

couple comments to address, but otherwise looks good! thanks henry!

@thehenrytsai thehenrytsai merged commit 8908f85 into main Aug 8, 2024
7 checks passed
@thehenrytsai thehenrytsai deleted the henrytsai/order-instructions branch August 8, 2024 20:04
@github-actions github-actions bot mentioned this pull request Aug 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants