Skip to content

fix: cancelOrder now returns transaction hash like cancelOrders - #1982

Open
Sertug17 wants to merge 1 commit into
ProjectOpenSea:mainfrom
Sertug17:fix/cancel-order-return-hash
Open

fix: cancelOrder now returns transaction hash like cancelOrders#1982
Sertug17 wants to merge 1 commit into
ProjectOpenSea:mainfrom
Sertug17:fix/cancel-order-return-hash

Conversation

@Sertug17

Copy link
Copy Markdown

Summary

cancelOrder computed transactionHash internally but never returned it,
leaving callers with no way to obtain it. cancelOrders the plural
counterpart has always returned the hash.

Changes

  • src/sdk/cancellation.ts: add return transactionHash + Promise<string> return type
  • src/sdk/base.ts: add Promise<string> return type + @returns JSDoc tag

Proof

// BEFORE — hash computed and discarded
// Transact and get the transaction hash   ← comment already said "get"
const transactionHash = await this.cancelSeaportOrders({...})
await this.context.confirmTransaction(transactionHash, ...)
// no return

// AFTER
return transactionHash  // ← one line fix

This is a non-breaking additive change existing callers that ignore the
return value are unaffected.

Fixes #1981

cancelOrder computed transactionHash via cancelSeaportOrders() but never
returned it, leaving callers with no way to obtain the hash. cancelOrders
has always returned it. This aligns the singular method with its plural
counterpart and matches the documented intent ('// Transact and get the
transaction hash' comment was already there).

- cancellation.ts: add return transactionHash + Promise<string> type
- base.ts: add Promise<string> type + @returns JSDoc tag

Fixes ProjectOpenSea#1981
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.

cancelOrder does not return the transaction hash unlike cancelOrders

1 participant